Re: [PERFORM] query not using GIN index

2015-08-24 Thread Jeff Janes
On Mon, Aug 24, 2015 at 8:18 AM, Guo, Yun wrote: > > > From: Jeff Janes > Date: Friday, August 21, 2015 at 10:44 PM > To: Yun > Subject: Re: [PERFORM] query not using GIN index > > On Fri, Aug 21, 2015 at 6:55 PM, Guo, Yun wrote: > >> Hi, >> >> We have a query on a column with GIN index, but q

Re: [PERFORM] query not using GIN index

2015-08-24 Thread Guo, Yun
Hi Tom, Thanks for you valuable input. >Hi, > >On 08/22/2015 03:55 AM, Guo, Yun wrote: >> Hi, >> >> We have a query on a column with GIN index, but query plan chooses not >> using the index but do an seq scan whichi is must slower >> >> CREATE INDEX idx_access_grants_on_access_tokens ON access

Re: [PERFORM] query not using GIN index

2015-08-24 Thread Guo, Yun
Hi Tom, Thanks for you valuable input. You¹re right, the plan was coming from explain analyze SELECT "access_grants".* FROM "access_grants² WHERE (access_tokens @> ARRAY['124e5a1f9de325fc176a7c89152ac734']) limit 1; We tried removing "limit 1², which did give us the benefit of using index for some

Re: [PERFORM] problem with select *

2015-08-24 Thread Andrew Dunstan
On 08/24/2015 03:04 AM, bhuvan Mitra wrote: Hello, I have a table with 12 columns and 20 Million rows. While writing the table I do not find any problem but when reading that I have some issues faced. When I perform a 'select * from table limit 1400;' (selecting 14million rows), it is w

Re: [PERFORM] Performance bottleneck due to array manipulation

2015-08-24 Thread Genc , Ömer
Thanks a lot, The mentioned advices helped me a lot. I used an approach similar to the one mentioned by Igor and Felix and now the stored procedure runs fast. Kind regards, From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-o

Re: [PERFORM] problem with select *

2015-08-24 Thread Andreas Joseph Krogh
På mandag 24. august 2015 kl. 09:04:07, skrev bhuvan Mitra mailto:bhuvan...@gmail.com>>: Hello,   I have a table with 12 columns and 20 Million rows. While writing the table I do not find any problem but when reading that I have some issues faced. When I perform a 'select * from table limit 140

Re: [PERFORM] problem with select *

2015-08-24 Thread Wei Shan
Hi, Please share with us on the configuration in postgresql.conf Thanks! On 24 August 2015 at 15:04, bhuvan Mitra wrote: > Hello, > > I have a table with 12 columns and 20 Million rows. While writing the > table I do not find any problem but when reading that I have some issues > faced. When I

[PERFORM] problem with select *

2015-08-24 Thread bhuvan Mitra
Hello, I have a table with 12 columns and 20 Million rows. While writing the table I do not find any problem but when reading that I have some issues faced. When I perform a 'select * from table limit 1400;' (selecting 14million rows), it is working fine. If the limit value is 1500, it is