pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: mallah@trade-india.com
To: pgsql-sql@postgresql.org
Subject: Re: Why is seq search preferred here by planner?
Date: Wed, 23 Apr 2003 10:00:20 -0700
Message-ID: <200304231000.20578.josh@agliodbs.com> (raw)
In-Reply-To: <1220.219.65.235.51.1051114881.squirrel@mail.trade-india.com>
References: <1220.219.65.235.51.1051114881.squirrel@mail.trade-india.com>

Mallah,

> UPDATE email_bank set country=personal_account_details.country where userid
> > 0 and userid=personal_account_details.userid  ;

While Postgres is letting you "fudge", you are missing part of that SQL 
statement.  It should be:

 UPDATE email_bank set country=personal_account_details.country
 FROM personal_account_details
 where userid > 0 and userid=personal_account_details.userid  ;

> tradein_clients=# begin work;explain analyze UPDATE email_bank set
> country=personal_account_details.country where userid > 0 and
> userid=personal_account_details.userid  ;BEGIN
> Time: 669.57 ms

Hmmm ... 669 ms seems pretty speedy for updating 150,000 rows.   What's the 
problem?

-- 
Josh Berkus
Aglio Database Solutions
San Francisco




view thread (10+ messages)  latest in thread

Message-ID: <200304231000.20578.josh@agliodbs.com>
Permalink:  ../200304231000.20578.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200304231000.20578.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, mallah@trade-india.com
  Subject: Re: Why is seq search preferred here by planner?
  In-Reply-To: <200304231000.20578.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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