X Gogo writes:
> Hi,
>
> I've been using 3.23.37 source tarball compiled for Linux 2.2.19. Now I
> upgraded to 3.23.39 but still the same result... Anyway, it's not that
> important - I was just wondering why SELECT DISTINCT ... LIMIT is slower than
> the
> one without LIMIT. It's not crucial
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
X Gogo writes:
> Well, the order in which the queries are made doesn't matter. The query with
> LIMIT is always slower than the one
> without it. When I used EXPLAIN SELECT... I actually
> found that MySQL uses temporary table for the query with
> the DISTINCT / LIMIT combination. I presume this
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
Because it wasn't in system cache yet?
X Gogo wrote:
> 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 fo
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