Archives of the TeradataForum
Message Posted: Tue, 20 Jan 2004 @ 18:12:04 GMT
| Subj: || || Re: V2R5 Statistics |
| From: || || Victor Sokovin |
| ||So which is efficient and performant.|| |
| ||Suppose I had 2 where clauses as follows :|| |
| ||1. WHERE col1 = 1 and col2 = 2|| |
| ||2. WHERE (col1,col2) = (1,2)|| |
| ||In the above case which kind of statistics would/should be used.|| |
In my opinion, these two syntax forms are optimized in exactly the same way. If there are any differences or bugs in some releases
perhaps somebody from NCR could correct me. I personally practically never use the second (vector) form as it never occurred to me that it might
offer any additional advantages in performance.
In both cases the multi-column statistics on (col1, col2) should be the most efficient form of statistics. A special case is when there is an
SI defined on one of the columns. In that case additional index statistics might also be useful for the optimizer.