List:General Discussion« Previous MessageNext Message »
From:Avenger Date:October 29 2003 7:41am
Subject:Re: Limit Optimization??
View as plain text  
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" <mysql_lists@stripped> wrote:

> Hi,
> 
> OK, did you just create key1 and CreatedTime? If you didn't have them
> before and don't need them, you can remove them and just create this
> index for your query (you can definitely replace key1 with this):
> 
> ALTER TABLE article
>     ADD INDEX (ClassID, Auditing, CreatedTime, ArticleID);
> 
> And then the query should only use the index for execution. Then you can
> of course run the second query to get all columns you want:
> 
> SELECT * FROM article WHERE ArticleID IN (<Comma seperated list of
> ArticleIDs from first query>) ORDER BY CreatedTime;
> 
> 
> Hope that helps!
> 
> 
> Matt

-- 
Avenger <a@stripped>

去发现极限方法的唯一办法就是去超越它

超越PHP http://www.phpe.net

Thread
Limit Optimization??avenger28 Oct
  • Re: Limit Optimization??Matt W28 Oct
  • Re: Limit Optimization??avenger28 Oct
  • Re: Limit Optimization??Matt W28 Oct
  • Re: Limit Optimization??avenger28 Oct
    • Re: Limit Optimization??Matt W30 Oct
  • Re: Limit Optimization??Matt W28 Oct
    • Re: Limit Optimization??Avenger29 Oct