cstore_reader

89 views
Skip to first unread message

Adam Scott

unread,
Sep 27, 2017, 7:58:00 PM9/27/17
to cstore users
Idea for speed up on skip indexes:

cstore doesn't assume the rows are sorted, but if they are sorted, it could use a binary search through stripes and within stripes.

Does this seem feasible and make sense?

Thank you,
Adam C. Scott

Murat Tuncer

unread,
Oct 2, 2017, 4:52:56 AM10/2/17
to Adam Scott, cstore users
Hi Adam,

This approach could be used to pinpoint the first stripe for the query filter range.  However, there is another way to achieve this without changin cstore.

PG10 has introduced declarative partitioning, where you can create a master table and partition it on a column or set of columns. a cstore table could be used as a partition of a master table. This way, query would be forwarded to only related cstore tables. 

I have experimented with this approach it generally works with few caveats
- application needs to create cstore_fdw partitions manually. it may be automated, need to verify this.
- postgres does not forward inserts into foreign table partitions, therefore you would have to insert into partitions directly. Your application/script needs to know where it is actually inserting.

One good side effect of this approach is, if you are partitioning on timestamp field,  you can retire old data in cstore table by just detaching the partition and dropping the cstore table.

Would this work for you ? 

Murat


--
You received this message because you are subscribed to the Google Groups "cstore users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cstore-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Murat Tuncer
Software Engineer | Citus Data
mtu...@citusdata.com

Adam Scott

unread,
Oct 4, 2017, 8:51:04 PM10/4/17
to Murat Tuncer, cstore users
Wow, that's a wonderful new feature.  We certainly could use that.  

Thank you Murat!

Adam

Reply all
Reply to author
Forward
0 new messages