EXPLAIN and nfiltered

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: EXPLAIN and nfiltered
Date: 2010-11-18 15:45:23
Message-ID: 4CE54A13.7090609@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Here's a patch for showing in EXPLAIN ANALYZE the number of rows a plan
qual filtered from a node's input. The output looks like this:

QUERY PLAN

-----------------------------------------------------------------------------------------------------------------------
Subquery Scan on ss (cost=0.00..50.00 rows=267 width=4) (actual
time=0.035..0.088 rows=5 filtered=3 loops=1)
Filter: (ss.a < 6)
-> Limit (cost=0.00..40.00 rows=800 width=4) (actual
time=0.031..0.067 rows=8 filtered=0 loops=1)
-> Seq Scan on foo (cost=0.00..40.00 rows=800 width=4)
(actual time=0.027..0.040 rows=8 filtered=2 loops=1)
Filter: (a < 9)
Total runtime: 0.146 ms
(6 rows)

It might be better if the output was on the Filter: line but this was
just the result of a quick idea and I wanted to see how much work the
actual implementation would be.

Any suggestions and comments on the output format, the patch and the
idea are welcome.

Regards,
Marko Tiikkaja

Attachment Content-Type Size
filter.patch text/plain 3.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2010-11-18 15:50:40 Re: final patch - plpgsql: for-in-array
Previous Message Cédric Villemain 2010-11-18 15:37:24 Re: final patch - plpgsql: for-in-array