Re: Re: Re: distinct / limit optimization

2001-07-02 Thread X Gogo
cation and does not prevent MySQL from being my favourite cup of database tea :) Thanx! George - èçõîäíî ñúîáùåíèå - Îò: Sinisa Milivojevic <[EMAIL PROTECTED]> Òåìà: Re: Re: distinct / limit optimization >X Gogo writes: >> Well, the order in which the queries are made do

Re: Re: distinct / limit optimization

2001-06-29 Thread X Gogo
well :) George - èçõîäíî ñúîáùåíèå - Îò: Gerald Clark <[EMAIL PROTECTED]> Òåìà: Re: distinct / limit optimization >Because it wasn't in system cache yet? > >X Gogo wrote: > >> Hi, >> >> I've tried the folowing query: >> SELECT DIS

distinct / limit optimization

2001-06-29 Thread X Gogo
Hi, I've tried the folowing query: SELECT DISTINCT column1 FROM table1 LIMIT 10; and got the result for 0.23 sec. Then I've tried the same query without limit: SELECT DISTINCT column1 FROM table1; and got the result for 0.01 sec. which is some 23 times faster. There are about 1 rows i

Re: RE: UPDATE and ORDER BY troubles

2001-06-05 Thread X Gogo
Well, Jeff you are right! I've just taken the wrong line from .mysql_history file. It was one of my thousands of tries to make the ORDER BY work with UPDATE. What I really try to do is ORDER BY the 'received' column, which is a timestamp. The point is if I have plenty of alarm messages which are n

UPDATE and ORDER BY troubles

2001-06-04 Thread X Gogo
Hi! The MySQL manual states that you can use ORDER BY in combination with the UPDATE statement. So I tried to use it, but it didn't work. Here is the sql query that's causing the trouble: mysql> UPDATE alarms SET is_parsed=1 WHERE is_parsed=0 ORDER BY is_parsed LIMIT 1; ERROR 1064: You have a