Re: Query Plan Columns - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Query Plan Columns
Date
Msg-id 5A0DD3B5-FC03-4087-AAF2-6001AC480F5B@kineticode.com
Whole thread Raw
In response to Re: Query Plan Columns  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Query Plan Columns
List 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,
"PlanWidth"            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,
"FunctionName"         TEXT,   "Function Call"         TEXT,   "Filter"                TEXT,   "One-Time Filter"
TEXT,  "Command"               TEXT,   "Shared Hit Blocks"     BIGINT,   "Shared Read Blocks"    BIGINT,   "Shared
WrittenBlocks" 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
expressedin milliseconds, yes? I'm wondering if INTERVAL would be more convenient for querying… 

Thanks,

David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: IA64 versus effective stack limit
Next
From: Dimitri Fontaine
Date:
Subject: Re: Simplifying replication