Eric writes: > Well, answering my own email, what I thought was a bug is not one at > all. I was mistaken in thinking that MySQL paid any attention to the > WHERE conditions when optimizing the join order beyond determining > which keys are used for the join, correct? > > This is really terrible for queries like mine where the query could be > sped up by orders of magnitude if the join optimizer would just > determine which table in the join to scan and which to do the key > lookup on based on a more intelligent estimation of the number of rows > from each table. It would have to go beyond looking at what keys are > used in the join (since each of the tables in my query can be looked > up by the same key) and account for the WHERE conditions placed on the > tables in the join. > > Is there sufficient metadata to estimate rows coming from a table > based on conditions placed on the attributes of that table? Where is > it? Has anyone ever thought of coding this? Can anyone give me a > place to start? > > eric. > > > -- > _____ _ > | ____|(_) http://ir.iit.edu/~ej > | _| | | Page me via ICQ at > | |___ | | http://wwp.mirabilis.com/19022931 > |______/ | or by mailing [EMAIL PROTECTED] > |__/ >
What information do you precisely require ?? The answer also depends on the API you are using and a method of retrieval. For example, you can know how many rows you get if you use _store_ instead of _use_ method, but that method is not applicable in the case of larger result sets. -- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php