Re: Query is slow when run for first time; subsequent execution is fast

2018-01-10 Thread Jeff Janes
On Wed, Jan 10, 2018 at 3:59 AM, Nandakumar M wrote: > > I am not using prepared statements. Postgres documentation and previous > questions in the pgsql-performance mailing list mention that the query plan > is cached only when prepared statements are used. > > https://www.postgresql.org/message

Query is slow when run for first time; subsequent execution is fast

2018-01-10 Thread Nandakumar M
Hello, This is my first question in postgres mailing list. If there are any mistakes, please don't mind. I am using PostgreSQL 9.4.4 on a Mac machine executing queries on postgres server through the psql client. servicedesk=# select version(); version

Re: PG 9.5 2 tables same DDL with diff size

2018-01-10 Thread ghiureai
Thank you Igor, I was able to eliminate  the 15GB bloating for a 35GB table size  , only after I restart the      Pg server with one single connections and run a full vacuum for table. Isabella On 10/01/18 11:10 AM, Igor Neyman wrote: -Original Message- From: Isabella Ghiurea [mail

RE: PG 9.5 2 tables same DDL with diff size

2018-01-10 Thread Igor Neyman
-Original Message- From: Isabella Ghiurea [mailto:isabella.ghiu...@nrc-cnrc.gc.ca] Sent: Wednesday, January 10, 2018 10:48 AM To: pgsql-performa...@postgresql.org Subject: RE: PG 9.5 2 tables same DDL with diff size Attention: This email was sent from someone outside of Perceptron. Alway

RE: PG 9.5 2 tables same DDL with diff size

2018-01-10 Thread Isabella Ghiurea
I run full vacuum and reindex on largest table (50GB) while there was no server activities so I assume no transaction was holding a lock on table since the full vacuum was able to run, anything where I should consider looking ? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-perform

RE: PG 9.5 2 tables same DDL with diff size

2018-01-10 Thread Igor Neyman
-Original Message- From: ghiureai [mailto:isabella.ghiu...@nrc-cnrc.gc.ca] Sent: Tuesday, January 09, 2018 5:54 PM To: pgsql-performa...@postgresql.org Subject: PG 9.5 2 tables same DDL with diff size HI List I am trying to understand the following : have 2 identical PG cluster on diff

Re: View preformance oracle to postgresql

2018-01-10 Thread Merlin Moncure
On Tue, Jan 9, 2018 at 3:32 PM, Reddygari, Pavan wrote: > > A view got converted to postgresql, performance while querying the view in > postgresql is 10X longer compared to oracle. > >FROM (item_attribute_value a > JOIN item_attribute ON ((a.iav_iat_id = item_attribute.iat_id))) > WHE

RE: Re: Unable to connect Postgres using psql while postgres is already running.

2018-01-10 Thread Dinesh Chandra 12108
Hi Laurenz Albe, Thanks for your response. But file ".s.PGSQL.5432" does not exist . How can I re-create this or any other option? Regards, Dinesh -Original Message- From: Laurenz Albe [mailto:laurenz.a...@cybertec.at] Sent: 10 January, 2018 2:41 PM To: Dinesh Chandra 12108 ; pgsql-

Re: View preformance oracle to postgresql

2018-01-10 Thread Laurenz Albe
Pavan Reddygari wrote: > A view got converted to postgresql, performance while querying the view in > postgresql is 10X longer compared to oracle. > Hardware resources are matching between oracle and postgresql. > > V_item_attributes view code as below, same in oracle and postgresql. > -

Re: Unable to connect Postgres using psql while postgres is already running.

2018-01-10 Thread Laurenz Albe
Dinesh Chandra 12108 wrote: > After restarting PostgreSQL Server, I am unable to connect postgres from > putty, I am getting error > > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.P

Unable to connect Postgres using psql while postgres is already running.

2018-01-10 Thread Dinesh Chandra 12108
Hi Expert, After restarting PostgreSQL Server, I am unable to connect postgres from putty, I am getting error psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? While postgres i

Re: Performance of a Query

2018-01-10 Thread Laurenz Albe
Scott Marlowe wrote: > On Tue, Jan 9, 2018 at 2:18 PM, Kumar, Virendra > wrote: > > Hello Gurus, > > > > I am struggling to tune a query which is doing join on top of aggregate for > > around 3 million rows. The plan and SQL is attached to the email. > > > > Below is system Details: > > > > PGS