Re: Running update in chunks?

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Running update in chunks?
Date: 2013-01-21 10:30:06
Message-ID: CAGuHJrOKGPi7wrJocUgj+8B2U5abJW9OdyDrfC0j7goFOu_Fhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Can you try a couple of things just to check timings. Probably worth EXPLAIN
> ANALYSE.
>
> SELECT count(*) FROM cars.imports i JOIN cars.models md ON i.model_id =
> md.id;

Takes about 300 ms

>
> CREATE TEMP TABLE tt AS SELECT i.* FROM cars.imports i JOIN cars.models md
> ON i.model_id = md.id;

Takes about 300 ms

>
> Now the first one should take half a second judging by your previous
> explain. If the second one takes 50 seconds too then that's just the limit
> of your SSD's write. If it's much faster then something else is happening.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2013-01-21 11:12:39 Re: Running update in chunks?
Previous Message Raghavendra 2013-01-21 10:11:18 Re: pg_Restore