i did
"SELECT .. FROM table WHERE cateid=1 AND ctime>xx ORDER BY ctime DESC LIMIT 10"
mysql can use INDEX(cateid,ctime), with NO filesort, this is very
fast, cos LIMIT is used by optimization
but now i have to query:
cateid IN(1,2,3,4,5)
now mysql use filesort, which is bad, cos it get all mat
hat explains it. :-)
Matt
- Original Message -
From: "Avenger"
Sent: Wednesday, October 29, 2003 1:41 AM
Subject: Re: Limit Optimization??
> That sooo cool... It was the very perfection of beauty.
>
> but i didnt' know.why my index (ClassID, Auditing, CreatedTime) ar
That sooo cool... It was the very perfection of beauty.
but i didnt' know.why my index (ClassID, Auditing, CreatedTime) are
slowly as matt's (ClassID, Auditing, CreatedTime, ArticleID)
could matt explain why?
Thx matt..
On Tue, 28 Oct 2003 02:06:16 -0600
"Matt W" <[EMAIL PROTECTED]> wrote:
> H
, October 28, 2003 1:37 AM
Subject: Re: Limit Optimization??
> It's my info publsih system
>
> My table structure :
> #
> # Table structure for table 'article'
> #
> CREATE TABLE article (
> ArticleID int(11) NOT NULL auto_increment,
> ClassID
ee which columns can or should be added to
> an index.
>
> Also, can you show which indexes are already on the table? The last
> lines of "SHOW CREATE TABLE table;" with the KEY definitions is fine.
>
>
> Matt
>
>
> - Original Message -
> From: "ave
s are already on the table? The last
lines of "SHOW CREATE TABLE table;" with the KEY definitions is fine.
Matt
- Original Message -
From: "avenger"
Sent: Monday, October 27, 2003 10:24 PM
Subject: Re: Limit Optimization??
> good job!!
> it short my query time f
>
>
> Hope that helps.
>
>
> Matt
>
>
> - Original Message -
> From: "avenger"
> Sent: Monday, October 27, 2003 7:57 PM
> Subject: Limit Optimization??
>
>
> > Does mysql do any optimization for then one use
> >
> > `select
quot;avenger"
Sent: Monday, October 27, 2003 7:57 PM
Subject: Limit Optimization??
> Does mysql do any optimization for then one use
>
> `select ... limit x,y`?
>
> For example, I have table with 200 records and want to do page web
> interface to this table.
>
>
Does mysql do any optimization for then one use
`select ... limit x,y`?
For example, I have table with 200 records and want to do page web
interface to this table.
When i use `select ... from table limit 150, 20 `, it will need more and
more times (on my here is more than 60 sec).
well,
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
15 matches
Mail list logo