Вопрос

While looking at query plan/execution time, I observed that it is taking most of the time in scanprepnode. Is it related organized on columns. I have two organized on columns in the table used in the query.

Here is snippet from plan file

1[00]: spu ScanPrepNode table 3347051 snippet 2 scanFlags 0x0
1[01]: spu ScanBlockCountNode: collect
1[02]: spu ReturnNode
501[00]: dbs ScanBlockCountNode: aggr
2[00]: spu ScanNode table "TBL" 3347051 memoryMode=no flags=0x0 index=0 cost=15271 (z) numSlicesEst=1 -- Cost=0.0..2345507.5 Rows=960.5K Width=80 Size=73.3MB Conf=41 {(IMSI)} 2[01]: spu RestrictNode (non-NULL)
. .
.
.

Plan Start 2014-05-14 12:49:47.801303 GMT 1.738 (plan execution)
Plan Finish 2014-05-14 12:49:49.539182 GMT 1.878 (plan total)

Estimate: Planner 581.548 Prep 0.743 Hmem 8 Mem 16 Channels 1 SQB
Actual: Rewrite 0.007 Plan 0.016 GKQ 0.003 Exec 1.864 @ 50% Res 0.242 Channels 1 Mem 4 Rows 1 Bytes 164
User: ---
Resource: ---

(1 row)

Это было полезно?

Решение

I found out the answer. The scan prep node reads the information about columns in restriction clause from the zonemaps. This information is useful in scanning phase. Based on this information, Netezza scans only the required few extents on the disk.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top