![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 12 Oct 2001 @ 13:32:39 GMT
Is COLLECT STATISTICS really always desirable? I have a different experience. A query which took to complete about two minutes, took more than an hour after stats have been collected on one of the tables involved. Statitsics were collected on a collumn named DWE_Date with a rather uneven distribution (details see below). In the query the table is joined to a one-row table via this column. The parser underestimates the size of the result of the join and duplicates on AMPs what it shoud not duplicate. Petr Horsky Details: 51157 rows, 207 different values, six of them with about 8 460 occurences, the others with 1-3 occurences
DWE_Date Count(*)
2001-10-10 8 468
2001-10-09 8 466
2001-10-08 8 462
2001-10-05 8 460
2001-10-04 8 458
2001-10-03 8 460
2001-10-01 1
2001-09-27 2
2001-09-26 2
2001-09-25 1
etc.
joined to a one-row table MD_DWE_Date which holds the current date ie. 2001-10-10 (and then to some other tables).
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||