Re: Query Plan Columns

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Query Plan Columns
Date: 2010-11-06 22:24:16
Message-ID: 5A0DD3B5-FC03-4087-AAF2-6001AC480F5B@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Nov 6, 2010, at 11:44 AM, David E. Wheeler wrote:

> On Nov 5, 2010, at 1:42 PM, David E. Wheeler wrote:
>
>>> http://git.postgresql.org/gitweb?p=postgresql.git;a=blob;f=src/backend/commands/explain.c;h=f494ec98e510c23120e072bd5ee8821ea12738a4;hb=HEAD#l617
>>
>> Ah, great, thanks.
>
> So based on this, I've come up with:

Updated:

CREATE TEMPORARY TABLE plans (
"Node Type" TEXT NOT NULL,
"Strategy" TEXT,
"Operation" TEXT,
"Startup Cost" FLOAT,
"Total Cost" FLOAT,
"Plan Rows" FLOAT,
"Plan Width" INTEGER,
"Actual Startup Time" FLOAT,
"Actual Total Time" FLOAT,
"Actual Rows" FLOAT,
"Actual Loops" FLOAT,
"Parent Relationship" TEXT,
"Sort Key" TEXT[],
"Sort Method" TEXT[],
"Sort Space Used" BIGINT,
"Sort Space Type" TEXT,
"Join Type" TEXT,
"Join Filter" TEXT,
"Hash Cond" TEXT,
"Relation Name" TEXT,
"Alias" TEXT,
"Scan Direction" TEXT,
"Index Name" TEXT,
"Index Cond" TEXT,
"Recheck Cond" TEXT,
"TID Cond" TEXT,
"Merge Cond" TEXT,
"Subplan Name" TEXT,
"Function Name" TEXT,
"Function Call" TEXT,
"Filter" TEXT,
"One-Time Filter" TEXT,
"Command" TEXT,
"Shared Hit Blocks" BIGINT,
"Shared Read Blocks" BIGINT,
"Shared Written Blocks" BIGINT,
"Local Hit Blocks" BIGINT,
"Local Read Blocks" BIGINT,
"Local Written Blocks" BIGINT,
"Temp Read Blocks" BIGINT,
"Temp Written Blocks" BIGINT,
"Output" TEXT[],
"Hash Buckets" BIGINT,
"Hash Batches" BIGINT,
"Original Hash Batches" BIGINT,
"Peak Memory Usage" BIGINT,
"Schema" TEXT,
"CTE Name" TEXT
);

Would I be right that "Node Type" is the only column can be NOT NULL?

Also, I'm thinking of making the "Actual Startup Time" and ""Actual Total Time" columns into INTERVALs. The times are expressed in milliseconds, yes? I'm wondering if INTERVAL would be more convenient for querying…

Thanks,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-11-06 22:52:29 Re: Simplifying replication
Previous Message Tom Lane 2010-11-06 22:17:19 Re: IA64 versus effective stack limit