Announcement Module No announcement yet.  optimization for inner
join.. order by.. limit with large order by data  Page Title
Module Move Remove Collapse Conversation Detail Module   •
Filter   • Time   • Show Clear All new posts    • optimization
for inner join.. order by.. limit with large order by data
Trying to optimize the following query in MySQL 5.0.45
SELECT * FROM artdistinct     INNER JOIN artartstyles USING
(pid)     WHERE CategoryID = '7778'     ORDER BY
ArtistLN,ArtistFN     LIMIT 90, 45;      The artdistinct and
artartstyles tables each have about 150K records.      This
takes about 60 seconds to execute. The order by uses two columns
that are each a varchar(50). If I change the order by column to
pID, the select takes about 3 seconds to execute. Any
suggestions on optimization for this? Thanks.      CREATE TABLE
`artdistinct` (     `pID` int(11) NOT NULL,     `PublisherCode`
char(3) NOT NULL DEFAULT '',     `ItemNo` varchar(50) NOT NULL,
`artType` int(11) DEFAULT NULL,     `IsAvai