pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to increase postgresql performance
5+ messages / 5 participants
[nested] [flat]
* How to increase postgresql performance
@ 2010-02-02 10:51 fida aljounaidi <fida.aljounaidi@gmail.com>
0 siblings, 3 replies; 5+ messages in thread
From: fida aljounaidi @ 2010-02-02 10:51 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to increase postgresql performance
@ 2010-02-02 10:56 Bret S. Lambert <bret.lambert@gmail.com>
parent: fida aljounaidi <fida.aljounaidi@gmail.com>
2 siblings, 1 reply; 5+ messages in thread
From: Bret S. Lambert @ 2010-02-02 10:56 UTC (permalink / raw)
To: fida aljounaidi <fida.aljounaidi@gmail.com>; +Cc: pgsql-admin
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 share, and select based on that?
>
> 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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to increase postgresql performance
@ 2010-02-02 11:00 Ian Lea <ian.lea@gmail.com>
parent: Bret S. Lambert <bret.lambert@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Ian Lea @ 2010-02-02 11:00 UTC (permalink / raw)
To: pgsql-admin
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 <bret.lambert@gmail.com> wrote:
> 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 share, and select based on that?
>
>>
>> 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
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to increase postgresql performance
@ 2010-02-02 23:34 Kiswono Prayogo <kiswono@gmail.com>
parent: fida aljounaidi <fida.aljounaidi@gmail.com>
2 siblings, 0 replies; 5+ messages in thread
From: Kiswono Prayogo @ 2010-02-02 23:34 UTC (permalink / raw)
To: fida aljounaidi <fida.aljounaidi@gmail.com>; +Cc: pgsql-admin
USE LEFT/JOIN instead of WHERE IN possibly would improve the performance..
On Tue, Feb 2, 2010 at 5:51 PM, fida aljounaidi
<fida.aljounaidi@gmail.com> 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'm using postgresql 8.4.
>
> Thanks for help
>
>
>
--
Regards,
Kiswono P
GB
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to increase postgresql performance
@ 2010-02-02 23:39 Scott Marlowe <scott.marlowe@gmail.com>
parent: fida aljounaidi <fida.aljounaidi@gmail.com>
2 siblings, 0 replies; 5+ messages in thread
From: Scott Marlowe @ 2010-02-02 23:39 UTC (permalink / raw)
To: fida aljounaidi <fida.aljounaidi@gmail.com>; +Cc: pgsql-admin
On Tue, Feb 2, 2010 at 3:51 AM, fida aljounaidi
<fida.aljounaidi@gmail.com> 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'm using postgresql 8.4.
In addition to the things already posted, post your query and the
output of explain analyze yourquery to the list and let us have a
look.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2010-02-02 23:39 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-02-02 10:51 How to increase postgresql performance fida aljounaidi <fida.aljounaidi@gmail.com>
2010-02-02 10:56 ` Bret S. Lambert <bret.lambert@gmail.com>
2010-02-02 11:00 ` Ian Lea <ian.lea@gmail.com>
2010-02-02 23:34 ` Kiswono Prayogo <kiswono@gmail.com>
2010-02-02 23:39 ` Scott Marlowe <scott.marlowe@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox