|
|
Archives of the TeradataForum
Message Posted: Thu, 22 Jan 2004 @ 22:34:15 GMT
Subj: | | Re: Misunderstanding of join index |
|
From: | | Victor Sokovin |
| Does anybody can explain why a SELECT with a COUNT(FIELD_1) or COUNT (DISTINCT FIELD_1) statement does not use the JI? I understand why we
can't create a JI with COUNT DISTINCT but I can't figure out for the SELECT statement. In my mind, the JI have the information to return the COUNT
information. | |
I assume you are referring to the same example as in the original posting? If so, COUNT(FIELD_1) cannot be calculated on the JI because
the aggregation on FIELD_1 had already been done and the original level of granularity is lost. COUNT(DISTINCT FIELD_1) could potentially be
calculated on the JI. Perhaps you could experiment with statistics?
Victor
| |