Archives of the TeradataForum
Message Posted: Thu, 05 Jan 2006 @ 18:22:10 GMT
I notice that you don't mention stats anywhere in your scenario. If there are no stats on a table Teradata will perform random amp sampling and you may get lucky and get a decent access path otherwise you may get unlucky and get a completely different access path.
If there are stale stats on the table, for example if the demographics of the table has changed by more than 10% Teradata may chose a bad access path because of these old stats. The worst case scenario would be if you collected stats on a table when it was empty and then inserted say 1 Billion rows into the table. Teradata would rightly think that the table was empty a really really bad access path for this query.
You should be collecting stats on every field that you are joining on, the index's and every field if the table is tiny.
Hope this helps,
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|