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

Re: update query taking too long

From: Chris <dmagick(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: update query taking too long
Date: 2007-06-28 06:20:59
Message-ID: 4683534B.8060609@gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
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/

In response to

pgsql-performance by date

Next:From: A. KretschmerDate: 2007-06-28 06:28:26
Subject: Re: update query taking too long
Previous:From: ChrisDate: 2007-06-28 06:16:50
Subject: Re: update query taking too long

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