Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!nsc!voder!blia!nobody From: nobody@blia.sharebase.com (Nobody at all) Newsgroups: comp.databases Subject: Re: Query Optimization (Magic Sets) Keywords: magic sets Message-ID: <13511@blia.sharebase.com> Date: 18 Feb 91 20:59:37 GMT References: <1991Feb14.192012.6084@doe.utoronto.ca> Reply-To: mike@woodstock.UUCP (Mike Ubell) Organization: ShareBase Lines: 25 In article <1991Feb14.192012.6084@doe.utoronto.ca> peter@doe.utoronto.ca (Peter Mielke) writes: > >I was just at a talk on relational database query optimization using >the technique of "Magic Sets". I was wondering what RDBMSes use any >form of query optimization (i myself have been bitten quite a number >of times by not writing my SQL query the right way)? Is it still on >the user of SQL to format the query in the right way to get the answer >the fastest way? >-- >Peter Mielke peter@doe.utoronto.ca >Dictionary of Old English Project utgpu!utzoo!utdoe!peter >University of Toronto Just for the record: ShareBase I and ShareBase II use an optimiser that is good for up to about a 4 way join and sometimes to ok on larger queries. They are not dependant on the way the query is stated (ordering of tables and/or qualification clauses (but certain SQL queries can be stated in a variety very different ways so these might effect the optimizer). ShareBase III (in beta test, scheduled for release around June) does a complete optimization search for up to about 10 way joins and a pruned search up to 32 way. As far as I know it will generate the same query plan for any semanticly equivalent SQL statements. (Both optimizers accept explicit directives from the user to set the query plan if the optimizer does not generate an acceptible one.)