Re: how could select id=xx so slow?

From: Yan Chunlu <springrider(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: how could select id=xx so slow?
Date: 2012-07-13 04:02:02
Message-ID: CAOA66tEcE9wRaTLAYdS+y+L_FA86=2MZF53N+hqZ7TAuGBGnQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

got it, thanks! without your help I really have no idea what should be fast
and what supposed to be slower.

I also find "select" involves a lot of writes:

iotop shows:

2789 be/4 postgres 0.00 B 57.34 M 0.00 % 0.00 % postgres: goov
conta 192.168.1.129(27300) SELECT

I knew that select could cause writes, but not at this magnitude....

On Fri, Jul 13, 2012 at 2:53 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:

> On Thu, Jul 12, 2012 at 9:07 AM, Ants Aasma <ants(at)cybertec(dot)at> wrote:
> > On Thu, Jul 12, 2012 at 3:48 PM, Yan Chunlu <springrider(at)gmail(dot)com>
> wrote:
> >> yes the system seems overloaded, I am dealing with a simple "INSERT"
> but not
> >> sure if it is normal that it took more time than the explain estimated:
> >
> > The estimated cost is in arbitrary units, its purpose is to compare
> > different execution plans, not estimate time taken. So it's completely
> > normal that it doesn't match actual time taken.
>
> Right. And to make explicit what you implied, when there is only one
> to do something (like insert a row, or do maintenance on an index) it
> often doesn't even attempt to cost that at all as there is no choice.
> So it is not just a matter of units.
>
> Cheers,
>
> Jeff
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2012-07-13 04:55:22 Re: [PERFORM] DELETE vs TRUNCATE explanation
Previous Message Jeff Janes 2012-07-13 01:00:49 Re: DELETE vs TRUNCATE explanation