From: Chris <dmagick@gmail.com>
To: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: update query taking too long
Date: Thu, 28 Jun 2007 16:20:59 +1000
Message-ID: <4683534B.8060609@gmail.com> (raw)
In-Reply-To: <20070628053724.GB22066@a-kretschmer.de>
References: <46834124.5010600@gmail.com>
<20070628053724.GB22066@a-kretschmer.de>
A. Kretschmer wrote:
> am Thu, dem 28.06.2007, um 15:03:32 +1000 mailte Chris folgendes:
>> Hi all,
>>
>> I'm trying to do an update of a reasonably large table and it's taking
>> way too long so I'm trying to work out why and if I need to tweak any
>> settings to speed it up.
>>
>> The table is around 3.5 million records.
>>
>> The query is
>>
>> update table set domainname=substring(emailaddress from position('@' in
>> emailaddress));
>
> I think, this is a bad idea.
> Because, first, you have 2 columns with nearly identical data
> (mailaddres includes the domain and a extra domain field)
Yeh I know. I might have to go back to the drawing board on this one.
The app has to work in mysql & postgres so I'm a bit limited in some of
my approaches.
--
Postgresql & php tutorials
http://www.designmagick.com/
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-performance@postgresql.org
Cc: dmagick@gmail.com, andreas.kretschmer@schollglas.com
Subject: Re: update query taking too long
In-Reply-To: <4683534B.8060609@gmail.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