Re: [ADMIN] How to increase postgresql performance

2010-02-02 Thread Scott Marlowe
On Tue, Feb 2, 2010 at 3:51 AM, fida aljounaidi wrote: > Hi > > I have an sql query which takes 20 seconds to be executed. > > this sql query contain more than 870 id under the select where in () > condition. > > So , it is not a large row result but a big list of conditions to be > crossed. > > I

Re: [ADMIN] How to increase postgresql performance

2010-02-02 Thread Kiswono Prayogo
USE LEFT/JOIN instead of WHERE IN possibly would improve the performance.. On Tue, Feb 2, 2010 at 5:51 PM, fida aljounaidi wrote: > Hi > > I have an sql query which takes 20 seconds to be executed. > > this sql query contain more than 870 id under the select where in () > condition. > > So , it

Re: [ADMIN] How to increase postgresql performance

2010-02-02 Thread Ian Lea
And maybe make sure that the id column is indexed, and see what EXPLAIN says. http://wiki.postgresql.org/wiki/Using_EXPLAIN -- Ian. On Tue, Feb 2, 2010 at 10:56 AM, Bret S. Lambert wrote: > On Tue, Feb 02, 2010 at 11:51:57AM +0100, fida aljounaidi wrote: >> Hi >> >> I have an sql query which ta

Re: [ADMIN] How to increase postgresql performance

2010-02-02 Thread Bret S. Lambert
On Tue, Feb 02, 2010 at 11:51:57AM +0100, fida aljounaidi wrote: > Hi > > I have an sql query which takes 20 seconds to be executed. > > this sql query contain more than 870 id under the select where in () > condition. Add a column to the table which denotes the characteristic that those 870 ids

[ADMIN] How to increase postgresql performance

2010-02-02 Thread fida aljounaidi
Hi I have an sql query which takes 20 seconds to be executed. this sql query contain more than 870 id under the select where in () condition. So , it is not a large row result but a big list of conditions to be crossed. I'm using postgresql 8.4. Thanks for help