From: | Steven Lembark <lembark(at)wrkhors(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Cc: | lembark(at)wrkhors(dot)com |
Subject: | Re: Long running INSERT+SELECT query |
Date: | 2018-04-27 19:50:41 |
Message-ID: | 20180427145041.031abeda.lembark@wrkhors.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 27 Apr 2018 19:38:15 +0300
Vitaliy Garnashevich <vgarnashevich(at)gmail(dot)com> wrote:
> We're going to try using "SELECT 1 FROM table FOR KEY SHARE" for each of
> the tables, which are referenced by results, before running the big
> query. That should be up to a million of rows in total. It will probably
> not cover the case when a record is INSERT'ed and then DELETE'd after
> the calculation has begun, but such cases should be even more rare than
> the DELETE's we're currently facing.
Thing about using a couple of Materialized Views for the worst
part of it.
--
Steven Lembark 1505 National Ave
Workhorse Computing Rockford, IL 61103
lembark(at)wrkhors(dot)com +1 888 359 3508
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Tauno Williams | 2018-04-27 19:57:43 | Re: Asynchronous Trigger? |
Previous Message | Andres Freund | 2018-04-27 17:33:40 | Re: Can PostgreSQL create new WAL files instead of reusing old ones? |