Postgres explain plan

show explain plan and cost is:

explain analyze <your select statement>
postgres=# explain analyze verbose select name, setting from pg_settings
where name like '%data_directory%';
                                                            QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------
 Function Scan on pg_catalog.pg_show_all_settings a  (cost=0.00..12.50 rows=1 width=64) (actual time=0.817..0.852 rows=2 loops=1)
   Output: a.name, a.setting
   Function Call: pg_show_all_settings()
   Filter: (a.name ~~ '%data_directory%'::text)
   Rows Removed by Filter: 342
 Planning Time: 0.183 ms
 Execution Time: 0.982 ms
(7 rows)

Leave a Comment

Scroll to Top