I have ported vectorize_engine for zedstore (vertical table AM).
Results of TPCH-10G/Q1 are the following:
par.workers
| PG9_6 vectorize=off
| PG9_6 vectorize=on
| master vectorize=off jit=on
| master vectorize=off jit=off | master vectorize=on jit=on | master vectorize=on jit=off | zedstore vectorize=off jit=on
| zedstore vectorize=off jit=off | zedstore vectorize=on jit=on | zedstore vectorize=on jit=off |
0
| 36
| 20
| 16
| 25.5
| 15
| 17.5
| 18
| 26
| 17
| 19
|
4
| 10
| -
| 5 | 7
| -
| - | 5
| 7
| -
| -
|
As you can see from this table time of query execution without vectorization is almost the same for zedstore as for standard heap.
If means that expression execution overhead is dominated in this case despite to the underlying storage.
Enabling vectorize engine increases speed of zedstore as well as of standard heap.
But still standard heap is faster.
May be my implementation of extracting data from zedstore is not optimal - I just calling in the loop zsbt_tid_scan_next + zsbt_attr_fetch.
I attached my implementation of zedstoream_getnexttile (I have added scan_getnexttile to tableAM interface).
Also I noticed that currently zedstore doesn't correctly calculate set of used attributes and so is extract useless data.
For example query like "select sum(x) from foo" cause fetching of all attributes from foo although we need just "x".
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company