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?
On Tue, 28 Oct 2003 02:06:16 -0600
"Matt W" <mysql_lists@stripped> wrote:
> 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!