From: | "Aftab Alam" <aalam(at)tatashare(dot)com> |
---|---|
To: | "'Daniel Caune'" <daniel(dot)caune(at)ubisoft(dot)com>, "'Jeff Frost'" <jeff(at)frostconsultingllc(dot)com> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Power cut and performance problem |
Date: | 2006-03-22 03:38:08 |
Message-ID: | 003001c64d62$09bd6a20$ec1010ac@aftabn463 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
unsubscribe
Regards,
-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of Daniel Caune
Sent: Tuesday, March 21, 2006 9:44 PM
To: Jeff Frost
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Power cut and performance problem
> > For example, the execution of the following query is fast as it used
to
> > be (gslog_event_id is the primary key on gslog_event):
> >
> > select max(gslog_event_id) from gslog_event; (=> Time: 0.773 ms)
> >
> >
> > while the following query is really slow (several minutes):
> >
> > select min(gslog_event_id) from gslog_event; (index on the primary
key
> > is taken)
> >
> >
> > I'm not a hardware expert at all, but I supposed that the whole
> > performance would be degraded when a problem occurs with RAID disks.
Am
> > I wrong? Could it be something else? Are there some tools that
check
> > the state of a PostgreSQL database?
>
> You would be correct, a hardware problem should manifest itself on
both
> those
> queries. What is the explain analyze output of those two queries?
It's
> possible you have a corrupt index on gslog_event. If that's the case,
a
> reindex would likely remedy the problem. Is postgres logging any
errors?
>
The UNIX administrator confirms that this is not a RAID problem.
I truncate my table. This is not the most efficient way, but it's okay
because this is a data stage table. It seems that it fixes my
performance problem. As you said, perhaps the problem was more related
to index corruption. Truncating data and inserting new data recreate
the index and therefore fix the problem.
Thanks,
--
Daniel
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Attachment | Content-Type | Size |
---|---|---|
winmail.dat | application/ms-tnef | 3.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Aftab Alam | 2006-03-22 03:38:47 | Re: Power cut and performance problem |
Previous Message | Bruno Wolff III | 2006-03-22 03:29:24 | Re: have you feel anything when you read this ? |