Summary:
Two queries that are nearly identical AND use the exact same indices
take much different times in execution. Both queries produce the exact
same results. One takes 1072ms to execute, the other 262ms. Although I
have a fix, it seems more of a hack, and I'd also like to know why it'
hat:
1. Just group by "pl.position" - remove the test. Do the estimated and
actual rows match now?
2. Rewrite the position='G' as a CASE structure
3. Do the position='G' part in a sub-query and join to that.
The results of those should show whether this is actually
your friend
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
.
--
_____
G l o b a l D i a g n o s t i c sI n c.
Andrew Schmidtt.416