Improve query speed?

From: James David Smith <james(dot)david(dot)smith(at)gmail(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Improve query speed?
Date: 2013-08-27 10:26:22
Message-ID: CAMu32ADVqZ9MxPQO5P=Wfmhi8XBtotE12ND=fs7SNWUXxGLnDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi there,

I was wondering if anyone had any ideas on how to make this UPDATE
query any quicker please?

UPDATE stage_cleaned
SET route_geom =
(SELECT route_geom.wkb_geometry FROM route_geom WHERE
route_geom.stage_cleaned_id::text = stage_cleaned.id::text GROUP BY
stage_cleaned_id, wkb_geometry)
WHERE route_geom IS NULL;

The table 'stage_cleaned' has about 300,000 rows, and the table
route_geom has a similar number.

Thanks

James

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Luca Ferrari 2013-08-27 13:25:11 Re: Improve query speed?
Previous Message Miguel Beltran R. 2013-08-26 18:02:09 Re: positive bigint arrays