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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to