Hi everyone,

I am having a rough time with a query, which seems to be taking so long
it hangs the systems.


SELECT
    l.CatalogNumber, 
    l.PDFLink, 
    l.PDFName, 
    l.Title, 
    p.PublisherName, 
    c.ComposerLname, 
    a.ArrangerLname, 
    l.Price, 
    l.Description, 
    o.Alias 
FROM
    listings l, 
    publishers p, 
    composers c, 
    arrangers a, 
    categories o 
WHERE
    a.ArrangerLname like '%$Criteria%' or
    p.PublisherName like '%$Criteria%' or
    c.ComposerLname like '%$Criteria%' or
    l.Title like '%$Criteria%' or
    l.CatalogNumber like '%$Criteria%'
AND 
    l.PublisherID=p.PublisherID and
    l.ComposerID=c.ComposerID and 
    l.ArrangerID=a.ArrangerID 
ORDER BY
    o.Alias";


How can I rewrite this query to be efficient (and functioning!) - I am
fairly new to MySQL and could use lots of advice!

Thanks!

-Erich-



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

Reply via email to