Skip site navigation (1) Skip section navigation (2)

Re: Slow UPADTE, compared to INSERT

From: Richard Huxton <dev(at)archonet(dot)com>
To: Ivar Zarans <iff(at)alcaron(dot)ee>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow UPADTE, compared to INSERT
Date: 2003-12-05 10:08:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Friday 05 December 2003 02:07, Ivar Zarans wrote:
> I have played around with explain and explain analyze and noticed one
> interesting oddity:
> Why first example, where recid is given as numeric constant, is using
> sequential scan, but second example, where recid is given as string
> constant works with index scan, as expected? Third example shows, that
> numeric constant must be typecasted in order to function properly.
> Is this normal behaviour of fields with bigint type?

As Christopher says, normal (albeit irritating). Not sure it applies here - 
all the examples you've shown me are using the index.

Well - I must admit I'm stumped. Unless you have a *lot* of indexes and 
foreign keys to check, I can't see why it would take so long to update a 
single row. Can you post the schema for the table?
  Richard Huxton
  Archonet Ltd

In response to


pgsql-performance by date

Next:From: Ivar ZaransDate: 2003-12-05 12:38:43
Subject: Re: Slow UPADTE, compared to INSERT
Previous:From: Thierry MissimillyDate: 2003-12-05 09:13:09
Subject: Re: tuning questions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group