Justin wrote:
> although in both case with and with out indexes the estimate still failed to
> return the correct number by allot.
The improvement wasn't to the part of the query that had the bad cost estimate,
it was to the part that was being performed hundreds of times instead of the
one time the planner estimated.
The planner still thought it was only going to perform a sequential scan of
your wooper table once. So even if there had been any Ad Hoc Index creation
code that had been used to consider creating indexes as part of a plan cost
estimate, it wouldn't have bothered creating any indexes on wooper.
Regards,
Stephen Denne.
Disclaimer:
At the Datamail Group we value team commitment, respect, achievement, customer
focus, and courage. This email with any attachments is confidential and may be
subject to legal privilege. If it is not intended for you please advise by
reply immediately, destroy it and do not copy, disclose or use it in any way.
__________________________________________________________________
This email has been scanned by the DMZGlobal Business Quality
Electronic Messaging Suite.
Please see http://www.dmzglobal.com/services/bqem.htm for details.
__________________________________________________________________
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster