Re: Partial index creation always scans the entire table

2020-02-15 Thread Laurenz Albe
On Sat, 2020-02-15 at 19:04 +0800, MingJu Wu wrote: > When creating partial indexes, can postgres utilize another index for > figuring which rows > should be included in the partial index, without performing a full table scan? No; it has to be a full sequential scan. > My scenario is that I have

Re: Partial index creation always scans the entire table

2020-02-15 Thread Justin Pryzby
On Sat, Feb 15, 2020 at 07:04:48PM +0800, MingJu Wu wrote: > Hello, > > When creating partial indexes, can postgres utilize another index for > figuring which rows should be included in the partial index, without > performing a full table scan? > > My scenario is that I have a table with 50M rows

Re: Partial index creation always scans the entire table

2020-02-15 Thread Sergei Kornilov
Hello > When creating partial indexes, can postgres utilize another index for > figuring which rows should be included in the partial index, without > performing a full table scan? No. create index always perform a seqscan on table. And two full table scan for create index concurrently. regar

Partial index creation always scans the entire table

2020-02-15 Thread MingJu Wu
Hello, When creating partial indexes, can postgres utilize another index for figuring which rows should be included in the partial index, without performing a full table scan? My scenario is that I have a table with 50M rows that are categorized into 10K categories. I need to create a partial ind