Re: Index Onlys Scan for expressions - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Index Onlys Scan for expressions
Date
Msg-id CA+TgmoaiYuarPYv2BWrXG-7XZ1EX75guirx2kTXQY0HxtD=Wuw@mail.gmail.com
Whole thread Raw
In response to Re: Index Onlys Scan for expressions  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-hackers
On Thu, Sep 8, 2016 at 2:58 PM, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
> Ildar> Could you please try the patch and tell if it works for you?
>
> I've tested patch6 against recent head. The patch applies with no problems.
>
> The previous case (filter on top of i-o-s) is fixed. Great work.
>
> Here are the test cases and results:
> https://gist.github.com/vlsi/008e18e18b609fcaaec53d9cc210b7e2
>
> However, it looks there are issues when accessing non-indexed columns.
> The error is "ERROR: variable not found in subplan target list"
> The case is 02_case2_fails.sql (see the gist link above)
>
> The essence of the case is "create index on substr(vc, 1, 128)"
> and assume that majority of the rows have length(vc)<128.
> Under that conditions, it would be nice to do index-only-scan
> and filter (like in my previous case), but detect "long" rows
> and do additional recheck for them.

Based on this report, this patch appears to have bugs that would
preclude committing it, so I'm marking it "Returned with Feedback" for
this CommitFest, which is due to end shortly.  Ildar, please feel free
to resubmit once you've updated the patch.

FWIW, I think this is a good effort and hope to see it move forward.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Sherrylyn Branchaw
Date:
Subject: Re: Change error code for hstore syntax error
Next
From: Jeevan Ladhe
Date:
Subject: Re: pgbench more operators & functions