On 23-Feb-2003 Julian wrote:
> Speed improvement with packet proceeding!?
>
> 1. Packet proceeding:
>
> I'm not quite sure is it possible with Mysql but it could be "easy" to
> be implemented.
> For example:
>
> select * from table where id=52 and name='some'
> select * from table where id=23 and email='[EMAIL PROTECTED]'
>
> these two queries select row(s) from table 'table' which means that
> these two queries could be tested simultaneously, so database file will
> be proceed only once.
What about the case where one (or both) selects fail?
And how would the application tell that there were multiple
rows where id=23 and email='[EMAIL PROTECTED]' ?
If you *know* that these two rows exist and unique then:
SELECT a.*,b.* from table as a, table as b
WHERE a.id=52 and a.name='some' AND
b.id=23 and b.email='[EMAIL PROTECTED]'
would do the same thing.
<snipage>
>
> In fact I'm not talking only about 'select'-s but any tables
> examination/traverse (i.e where clauses etc..), so queries like these
> could be also speed up:
>
> update table set data='test' where name='some'
> select * from table where id=10
>
What would be the sensible error message if your update failed
but your select succeeds ?
What would be the expected value of mysql_numrows() ?
And what if there are multiple rows where id=10 ?
<snipage>
> 2. Bulk update/delete etc..
>
> Take a look at this update query (not implemented.. yet!)
> update table1 set column=value,... where clause limit #, update table2
> set ....
> (or delete from table1 where clause limit rows, delete from table2 where
> clause...)
>
The same question: How would a program tell which statement failed?
<snip again>
> Have I a good point here? Any ideas and discussion about these
> suggestions?
You'll need to rethink the failure modes.
What you're suggesting might be useful in certain special case(s)
but badly fails the general case.
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php