Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-29 Thread David Steele
On 3/25/16 11:13 AM, David Steele wrote: Time is growing short and there seem to be some serious concerns with this patch. Can you provide a new patch soon? If not, I think it might be be time to mark this "returned with feedback". I have marked this patch "returned with feedback". Please f

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-25 Thread David Steele
Hi Teador, On 3/19/16 8:44 PM, Tomas Vondra wrote: Sadly the v4 does not work for me - I do get assertion failures. Time is growing short and there seem to be some serious concerns with this patch. Can you provide a new patch soon? If not, I think it might be be time to mark this "returne

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-19 Thread Tomas Vondra
Hi Teodor, Sadly the v4 does not work for me - I do get assertion failures. For example with the example Andreas Karlsson posted in this thread: CREATE EXTENSION btree_gin; CREATE TABLE test (a int, b int, c int); CREATE INDEX ON test USING gin (a, b, c); INSERT INTO test SELECT i % 7, i % 9,

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-19 Thread Teodor Sigaev
I also wonder whether the patch should add explanation of OR-clauses handling into the READMEs in src/backend/access/* Not yet, but will The patch would probably benefit from transforming it into a patch series - one patch for the infrastructure shared by all the indexes, then one patch per ind

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-18 Thread Teodor Sigaev
I also wonder whether the patch should add explanation of OR-clauses handling into the READMEs in src/backend/access/* Oops, will add shortly. The patch would probably benefit from transforming it into a patch series - one patch for the infrastructure shared by all the indexes, then one pat

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-18 Thread Andreas Karlsson
I gave this patch a quick spin and noticed a strange query plan. CREATE TABLE test (a int, b int, c int); CREATE INDEX ON test USING gin (a, b, c); INSERT INTO test SELECT i % 7, i % 9, i % 11 FROM generate_series(1, 100) i; EXPLAIN ANALYZE SELECT * FROM test WHERE (a = 3 OR b = 5) AND c =

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-10 Thread Tomas Vondra
Hi Teodor, I've looked into v2 of the patch you sent a few days ago. Firstly, I definitely agree that being able to use OR conditions with an index is definitely a cool idea. I do however agree with David that the patch would definitely benefit from comments documenting various bits that are les

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-02-29 Thread Teodor Sigaev
Thank you for review! I'd like to see comments too! but more so in the code. :) I've had a look over this, and it seems like a great area in which we could improve on, and your reported performance improvements are certainly very interesting too. However I'm finding the code rather hard to follo

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-01-28 Thread Alvaro Herrera
I think this is very exciting stuff, but since you didn't submit an updated patch after David's review, I'm closing it for now as returned-with-feedback. Please submit a new version once you have it. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Suppor

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-01-10 Thread David Rowley
On 27 December 2015 at 07:04, Teodor Sigaev wrote: > I'd like to present OR-clause support for indexes. Although OR-clauses > could be supported by bitmapOR index scan it isn't very effective and such > scan lost any order existing in index. We (with Alexander Korotkov) > presented results on Vie

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2015-12-26 Thread Teodor Sigaev
This is great. I got a question, is it possible make btree index to support OR as well? Is btree supports more invasive, in the sense that we need to do enhance ScanKey to supports an array of values? Btree now works by follow: find the max/min tuple which satisfies condtions and then executes

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2015-12-26 Thread Feng Tian
Hi, Teodor, This is great. I got a question, is it possible make btree index to support OR as well? Is btree supports more invasive, in the sense that we need to do enhance ScanKey to supports an array of values? Thanks, Feng On Sat, Dec 26, 2015 at 10:04 AM, Teodor Sigaev wrote: > I'd like

[HACKERS] POC, WIP: OR-clause support for indexes

2015-12-26 Thread Teodor Sigaev
I'd like to present OR-clause support for indexes. Although OR-clauses could be supported by bitmapOR index scan it isn't very effective and such scan lost any order existing in index. We (with Alexander Korotkov) presented results on Vienna's conference this year. In short, it provides performa