Re: Online 5.04: Miserable Performace
Posted in 1997
--- mail bounce --- } } > } > I am working with Online 5.04 in a Sun Spark 10 (SunOS 4.1.3). The } > following query (run from isql) takes for ever to complete with no users } > in the system. In fact, after 4 or 5 minutes I interrupted it. } > } > SELECT count(*) } > FROM contacts, companies } > WHERE companies.active = -1 } > AND contacts.active = -1 } > AND companies.company_id = contacts.company_id } > AND (description MATCHES "*cancer*lung*" OR } > interest MATCHES "*cancer*lung*") } } Change to a UNION: } } SELECT count(*) } FROM contacts, companies } WHERE companies.active = -1 } AND contacts.active = -1 } AND companies.company_id = contacts.company_id } AND description MATCHES "*cancer*lung*" } UNION } SELECT count(*) } FROM contacts, companies } WHERE companies.active = -1 } AND contacts.active = -1 } AND companies.company_id = contacts.company_id } AND interest MATCHES "*cancer*lung*" } } Also look at the indexes on these two tables. } Also look at SET EXPLAIN ON output } Have you done an UPDATE STATISTICS? } } cheers } j. } ________________________________________________________________________ } jparker@informix.com Burlington, MA, USA (x1619) } "If anything can go wrong, fix it - to hell with Murphy." } ________________________________________________________________________ } Any opinions expressed herein are my own and not those of my employers. } -- ________________________________________________________________________ jparker@informix.com Burlington, MA, USA (x1619) "If anything can go wrong, fix it - to hell with Murphy." ________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers.