explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6MDT : select SensorizableItem.idTable, SensorizableItem.table, SensorizableItem.description, SensorizableItem.code, SensorizableItem.type from ( select a.id as idTable,'asset' as table , a.serial_number as description, am.description as code, 'flow' as type from emaya.asset a inner join emaya.asset_maker am on a.asset_maker_id = am.id where a.id not in ( select da.asset_id from emaya.dma_asset da where da.dma_id = (3603)) union all select s.id as idTable,'sensor' as table, s.name as description, s.identifier_name as code, type from emaya.sensor s where s.type = 'flow' and s.id not in ( select ds.sensor_id from emaya.dma_sensor ds where ds.dma_id = (3603)) ) SensorizableItem where 1 = 1 AND (SensorizableItem.description ilike '%C/MAR%' OR SensorizableItem.code ilike '%C/MAR%');

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.158 55.012 ↑ 11.4 71 1

Sort (cost=146.63..148.65 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)

  • Sort Key: n.nspname, p.proname, (pg_get_function_arguments(p.oid))
  • Sort Method: quicksort Memory: 43kB
2. 1.378 54.854 ↑ 11.4 71 1

Hash Join (cost=1.14..107.61 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)

  • Hash Cond: (p.pronamespace = n.oid)
3. 53.465 53.465 ↓ 3.0 2,402 1

Seq Scan on pg_proc p (cost=0.00..89.30 rows=808 width=78) (actual time=0.052..53.465 rows=2,402 loops=1)

  • Filter: pg_function_is_visible(oid)
4. 0.004 0.011 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
5. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on pg_namespace n (cost=0.00..1.09 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: ((nspname <> 'pg_catalog'::name) AND (nspname <> 'information_schema'::name))