Re: Index Skip Scan
От | Jesper Pedersen |
---|---|
Тема | Re: Index Skip Scan |
Дата | |
Msg-id | b0a83318-5bae-3996-4231-9f2d6565856f@redhat.com обсуждение исходный текст |
Ответ на | Re: Index Skip Scan (Floris Van Nee <florisvannee@Optiver.com>) |
Список | pgsql-hackers |
Hi Floris, On 6/1/19 12:10 AM, Floris Van Nee wrote: > Given a table definition of (market text, feedcode text, updated_at timestamptz, value float8) and an index on (market,feedcode, updated_at desc) (note that this table slightly deviates from what I described in my previous mail) andfilling it with data. > > > The following query uses an index skip scan and returns just 1 row (incorrect!) > > select distinct on (market, feedcode) market, feedcode > from streams.base_price > where market='TEST' > > The following query still uses the regular index scan and returns many more rows (correct) > select distinct on (market, feedcode) * > from streams.base_price > where market='TEST' > > > It seems that partially filtering on one of the distinct columns triggers incorrect behavior where too many rows in theindex are skipped. > > Thanks for taking a look at the patch, and your feedback on it. I'll def look into this once I'm back from my travels. Best regards, Jesper
В списке pgsql-hackers по дате отправления: