From: | Greg Stark <stark(at)mit(dot)edu> |
---|---|
To: | Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Estimate maintenance_work_mem for CREATE INDEX |
Date: | 2017-12-19 14:14:34 |
Message-ID: | CAM-w4HOOhfif6nao1GU9B-8rzb1vy5YGocW+XFy4HOQmupvZbw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On 19 December 2017 at 10:00, Oleksandr Shulgin
<oleksandr(dot)shulgin(at)zalando(dot)de> wrote:
> If there would be an option in the database itself to provide those
> estimation, we wouldn't even need to figure out estimation queries.
> "EXPLAIN CREATE INDEX" anyone?
You're not the first to propose something like that. I think an
EXPLAIN ALTER TABLE would also be very handy -- it's currently
impossible to tell without carefully reading the source code whether a
given DDL change will require a full table scan, a full table rewrite,
or just a quick meta data update (and even in that case what strength
lock will be required). I think there are other utility statements
that make interesting heuristic decisions that would be nice to be
able to have some visibility into -- CLUSTER comes to mind.
I'm not clear how you would determine how much memory is needed to
sort a table without actually doing the sort though. So that would be
more of an EXPLAIN ANALYZE wouldn't it?
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | scott ribe | 2017-12-19 14:29:29 | Re: Estimate maintenance_work_mem for CREATE INDEX |
Previous Message | Laurenz Albe | 2017-12-19 12:41:18 | Re: Background worker process |
From | Date | Subject | |
---|---|---|---|
Next Message | Marina Polyakova | 2017-12-19 14:22:29 | Re: WIP Patch: Pgbench Serialization and deadlock errors |
Previous Message | Fabien COELHO | 2017-12-19 14:11:11 | Re: WIP Patch: Pgbench Serialization and deadlock errors |