pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedextremely slow when execute select/delete for certain tables only...
4+ messages / 3 participants
[nested] [flat]
* extremely slow when execute select/delete for certain tables only...
@ 2006-05-08 08:47 kah_hang_ang@toray.com.my
0 siblings, 1 reply; 4+ messages in thread
From: kah_hang_ang@toray.com.my @ 2006-05-08 08:47 UTC (permalink / raw)
To: pgsql-performance
I'm facing a very weird problem.
Recently our database run very slow when execute Delete/Select statement
for a few tables only..
The largest table only have 50K rows of data.
When I run the statement from pgAdmin although it is slow but not as slow
as run from webapp.
When I run the statement from webapp, it become extremely slow.
Even a simple delete statement will takes 20-40 minutes to complete.
I already vacuum those tables with full option but it still the same.
What could be the possible causes of this problem?
How can I solve it?
CPU - Intel Xeon 2.40 GHz
Memory - 1.5G
Postgresql version: 7.2.2
Thanks.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: extremely slow when execute select/delete for certain
@ 2006-05-08 09:21 Markus Schaber <schabi@logix-tt.com>
parent: kah_hang_ang@toray.com.my
0 siblings, 1 reply; 4+ messages in thread
From: Markus Schaber @ 2006-05-08 09:21 UTC (permalink / raw)
To: kah_hang_ang@toray.com.my; +Cc: pgsql-performance
Hi, Kah,
kah_hang_ang@toray.com.my wrote:
> I already vacuum those tables with full option but it still the same.
>
> What could be the possible causes of this problem?
> How can I solve it?
>
> CPU - Intel Xeon 2.40 GHz
> Memory - 1.5G
> Postgresql version: 7.2.2
First, you should consider to upgrade your PostgreSQL server to a newer
version, at least to 7.2.8 which fixes some critical bugs.
But it will be much better to upgrade to current 8.1 version, as I think
that your problem is caused by index bloat, and indices are handled much
better in 8.1.
Try recreating your indices using REINDEX command.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: extremely slow when execute select/delete for certain
@ 2006-05-08 17:27 Jim C. Nasby <jnasby@pervasive.com>
parent: Markus Schaber <schabi@logix-tt.com>
0 siblings, 0 replies; 4+ messages in thread
From: Jim C. Nasby @ 2006-05-08 17:27 UTC (permalink / raw)
To: Markus Schaber <schabi@logix-tt.com>; +Cc: pgsql-performance
On Mon, May 08, 2006 at 11:21:16AM +0200, Markus Schaber wrote:
> Hi, Kah,
>
> kah_hang_ang@toray.com.my wrote:
>
> > I already vacuum those tables with full option but it still the same.
> >
> > What could be the possible causes of this problem?
> > How can I solve it?
> >
> > CPU - Intel Xeon 2.40 GHz
> > Memory - 1.5G
> > Postgresql version: 7.2.2
>
> First, you should consider to upgrade your PostgreSQL server to a newer
> version, at least to 7.2.8 which fixes some critical bugs.
Note that 7.2.x isn't supported anymore, and there's data loss bugs that
could affect it. You should at least move up to 7.4.x.
> But it will be much better to upgrade to current 8.1 version, as I think
> that your problem is caused by index bloat, and indices are handled much
> better in 8.1.
>
> Try recreating your indices using REINDEX command.
And if that doesn't work we need at least the output of EXPLAIN, if not
EXPLAIN ANALYZE.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: extremely slow when execute select/delete for certain tables
@ 2006-05-09 01:39 kah_hang_ang@toray.com.my
0 siblings, 0 replies; 4+ messages in thread
From: kah_hang_ang@toray.com.my @ 2006-05-09 01:39 UTC (permalink / raw)
To: Markus Schaber <schabi@logix-tt.com>; Jim C. Nasby <jnasby@pervasive.com>; +Cc: pgsql-performance
Actually now I already work to upgrade Postgresql version to 8.1 but not
yet finish.
Yesterday I did re-create the affected tables indices, it does improve the
performance but still need 2-5 mins to execute the query.
Is this 'normal' for a table with 40K rows of records?
Anyway thanks for your help.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-05-09 01:39 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 08:47 extremely slow when execute select/delete for certain tables only... kah_hang_ang@toray.com.my
2006-05-08 09:21 ` Re: extremely slow when execute select/delete for certain Markus Schaber <schabi@logix-tt.com>
2006-05-08 17:27 ` Re: extremely slow when execute select/delete for certain Jim C. Nasby <jnasby@pervasive.com>
2006-05-09 01:39 Re: extremely slow when execute select/delete for certain tables kah_hang_ang@toray.com.my
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