Re: Improve query speed? - Mailing list pgsql-novice

From Luca Ferrari
Subject Re: Improve query speed?
Date
Msg-id CAKoxK+7wYv++SpTNf9Nr=G8A_mHaRNX+B=rButwikaVUyQbQzQ@mail.gmail.com
Whole thread Raw
In response to Improve query speed?  (James David Smith <james.david.smith@gmail.com>)
List pgsql-novice
On Tue, Aug 27, 2013 at 12:26 PM, James David Smith
<james.david.smith@gmail.com> wrote:
> 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;

Well, hard to say if you do not provide information about what you
mean with "quicker" and about how the inner select is executed. I
would recommend running the inner join query alone and see how the
planner is going to extract the data from it.

Luca


pgsql-novice by date:

Previous
From: James David Smith
Date:
Subject: Improve query speed?
Next
From: Charles Sheridan
Date:
Subject: CTAGS for PG/sql ?