Re: [PERFORM] Not same plan between static and prepared query

2013-06-10 Thread Ghislain ROUVIGNAC
Hello Amit, Thank you for your help. You are right, it work fine with PostgreSQL 9.2. *Ghislain ROUVIGNAC* 2013/6/6 Amit Kapila > > On Thursday, June 06, 2013 1:56 PM Ghislain ROUVIGNAC wrote: > > Hello, > > > > We have a strange issue related to a prepared statement. > > > > We have two

Re: [PERFORM] Not same plan between static and prepared query

2013-06-10 Thread Amit Kapila
erformance-ow...@postgresql.org [mailto:pgsql-performance- > ow...@postgresql.org] On Behalf Of Amit Kapila > Sent: Thursday, June 06, 2013 1:41 PM > To: 'Ghislain ROUVIGNAC'; pgsql-performance@postgresql.org > Subject: Re: [PERFORM] Not same plan between static and prepare

Re: [PERFORM] Not same plan between static and prepared query

2013-06-09 Thread David Johnston
Yuri Levinsky wrote >> We have two equals queries where the sole difference is in the limit. >> - The first is hard coded with limit 500. >> - The second is prepared with limit $1 ($1 is bound to 500). > > >> PostgreSQL give us two different plans with a huge execution time for >> the > prepared

Re: [PERFORM] Not same plan between static and prepared query

2013-06-09 Thread Yuri Levinsky
7;Ghislain ROUVIGNAC'; pgsql-performance@postgresql.org Subject: Re: [PERFORM] Not same plan between static and prepared query On Thursday, June 06, 2013 1:56 PM Ghislain ROUVIGNAC wrote: > Hello, > We have a strange issue related to a prepared statement. > We have two equals queri

Re: [PERFORM] Not same plan between static and prepared query

2013-06-06 Thread Amit Kapila
On Thursday, June 06, 2013 1:56 PM Ghislain ROUVIGNAC wrote: > Hello, > We have a strange issue related to a prepared statement. > We have two equals queries where the sole difference is in the limit. > - The first is hard coded with limit 500. > - The second is prepared with limit $1 ($1 is b

[PERFORM] Not same plan between static and prepared query

2013-06-06 Thread Ghislain ROUVIGNAC
Hello, We have a strange issue related to a prepared statement. We have two equals queries where the sole difference is in the limit. - The first is hard coded with limit 500. - The second is prepared with limit $1 ($1 is bound to 500). PostgreSQL give us two different plans with a huge execu