explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hvx5 : Optimization for: GroupAggregate (cost=22.56..27844.88 rows=1 width=36) (actual time=132630.142..132630.142 rows=1 loops=1) Group Key: party_0.id -> Nested Loop (cost=22.56..27844.87 rows=1 width=36) (actual time=16015.373..132630.134 rows=1 loops=1) Join Filter: ((virtual_3.terminal_id)::text = (part_3.terminal_id)::text) Rows Removed by Join Filter: 1914 -> Nested Loop (cost=22.56..21709.12 rows=1 width=71) (actual time=0.273..85.998 rows=1915 loops=1) -> Hash Join (cost=22.28..21700.81 rows=1 width=70) (actual time=0.261..58.939 rows=1915 loops=1) Hash Cond: ((virtual_3.site_id)::text = (site_3.id)::text) -> Seq Scan on asset_track_virtual_event virtual_3 (cost=0.00..21637.19 rows=11023 width=106) (actual time=0.005..53.143 rows=11489 loops=1) Filter: ((inventory_event_id IS NULL) AND (estate_owner_id = 358)) Rows Removed by Filter: 165086 -> Hash (cost=22.20..22.20 rows=6 width=71) (actual time=0.025..0.025 rows=1 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 9kB -> Index Scan using plc_site_party_id_idx on plc_site site_3 (cost=0.41..22.20 rows=6 width=71) (actual time=0.015..0.017 rows=1 loops=1) Index Cond: ((party_id)::text = '-6cd1dec3:15ec8ab382a:-7b6b:AC150046'::text) Filter: ((site_type)::text = 'SITE_ADDRESS'::text) Rows Removed by Filter: 1 -> Index Scan using plc_party_pkey on plc_party party_0 (cost=0.28..8.30 rows=1 width=36) (actual time=0.011..0.012 rows=1 loops=1915) Index Cond: ((id)::text = '-6cd1dec3:15ec8ab382a:-7b6b:AC150046'::text) Filter: (estate_owner_id = 358) -> Seq Scan on plc_part part_3 (cost=0.00..6125.26 rows=839 width=70) (actual time=21.009..69.210 rows=1 loops=1915) Filter: (upper((serial_number)::text) ~~ '15168PP81550412'::text) Rows Removed by Filter: 169857 Planning time: 3.895 ms Execution time: 132630.225 ms; plan #QlxQ3

Settings

Optimization path:

# 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))