pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: WIP: Covering + unique indexes.
Date: Wed, 13 Jan 2016 16:58:32 +0300
Message-ID: <56965808.7050004@postgrespro.ru> (raw)
In-Reply-To: <CAKJS1f_GsQRQGYwUfBkL8H5ar4LW0sQ24cyZBdKAhFpG2jEsdw@mail.gmail.com>
References: <56167F09.3090101@postgrespro.ru>
	<56168952.4010101@postgrespro.ru>
	<CAA-aLv7mWdu5WCrUH0sw79abDsq4tdZEpkvV8SfgNyLp92+z6Q@mail.gmail.com>
	<5617DAA3.6080408@postgrespro.ru>
	<565D9859.3040405@postgrespro.ru>
	<CAKJS1f_oR+P_c+u8PtdEFyWPi4NP-vt69sQGYXTv9NQ48U5JiA@mail.gmail.com>
	<CAKJS1f_GYoJsYLJyK_92_v38x8LO5Nk+4w8=E2yqLDbTyPS7ug@mail.gmail.com>
	<CAMkU=1wZ8-mNHNMuG3BeMJkXxPyRJFNqbNnc8CaXMGxpciv8aQ@mail.gmail.com>
	<CAKJS1f9W0aB-g7H6yYgNBq7hJsOKF3UwHU7-Q5jobbaTyK9f4g@mail.gmail.com>
	<569530FC.2010900@postgrespro.ru>
	<CAKJS1f_GsQRQGYwUfBkL8H5ar4LW0sQ24cyZBdKAhFpG2jEsdw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

13.01.2016 04:27, David Rowley:
> I've also done some testing:
>
> create table ab (a int, b int);
> insert into ab select a,b from generate_Series(1,10) a(a), 
> generate_series(1,10000) b(b);
> set enable_bitmapscan=off;
> set enable_indexscan=off;
>
> select * from ab where a = 1 and b=1;
>  a | b
> ---+---
>  1 | 1
> (1 row)
>
> set enable_indexscan = on;
> select * from ab where a = 1 and b=1;
>  a | b
> ---+---
> (0 rows)
>
> This is broken. I've not looked into why yet, but from looking at the 
> EXPLAIN output I was a bit surprised to see b=1 as an index condition. 
> I'd have expected a Filter maybe, but I've not looked at the EXPLAIN 
> code to see how those are determined yet.

Hmm... Do you use both patches?
And could you provide index definition, I can't reproduce the problem 
assuming that index is created by the statement
CREATE INDEX idx ON ab (a) INCLUDING (b);

-- 
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (217+ messages)  latest in thread

Message-ID: <56965808.7050004@postgrespro.ru>
Permalink:  ../56965808.7050004@postgrespro.ru/
Also on:    postgresql.org/message-id/56965808.7050004@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.lubennikova@postgrespro.ru, david.rowley@2ndquadrant.com, jeff.janes@gmail.com
  Subject: Re: WIP: Covering + unique indexes.
  In-Reply-To: <56965808.7050004@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox