|
Archives of the TeradataForumMessage Posted: Thu, 18 Nov 2004 @ 20:10:34 GMT
Hello all, And I personally use those big discrepancies to uncover query problems, like missing stats! When I have a problem query, I run it, check it with PMon, and see where the estimated varies from the actual (of course, this only works when it's stuck in a step for a while). Then I look at those steps (like in Visual Explain) and see what the heck the optimizer thought it was doing, versus what might be better. Perhaps I'll see where the spool in the current (stuck) step that's being used in a product join took 700 million I/O's to create, as opposed to the estimated 700 I/O's. And I can track down things like: * Missing statistics to the table level * Sampled stats that are incorrect due to lack of uniqueness * Skewed steps dues to casts in the joins, where it can't estimate. I understand I can get those estimated versus actual from Querylog, but I'd just like to be able to log a single query, or even better, let a user "turn on" a PMon type log for a single query and then send it to me. Sort of like an augmented explain (say, that would be the EXPLAINANDRUN modifier). Ooops, sorry, my train of thought got derailed. Anyway, the estimated versus actual is very useful. iv
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||