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:

> 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 <[EMAIL PROTECTED]>

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

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


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to