explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XAnk

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 83,686.185 ↑ 108.6 55 1

Nested Loop Left Join (cost=4.62..7,599.04 rows=5,974 width=804) (actual time=83,684.817..83,686.185 rows=55 loops=1)

2. 0.006 83,685.994 ↑ 1.0 50 1

Limit (cost=1.14..4,726.91 rows=50 width=660) (actual time=83,684.805..83,685.994 rows=50 loops=1)

3. 0.042 83,685.988 ↑ 932.1 50 1

Nested Loop Left Join (cost=1.14..4,404,804.98 rows=46,604 width=660) (actual time=83,684.805..83,685.988 rows=50 loops=1)

4. 83,684.796 83,684.796 ↑ 932.1 50 1

Index Scan using i_iws_pc_src_lei_flg_newer on dist_inv_workflow_states diws (cost=0.57..4,282,398.83 rows=46,604 width=71) (actual time=83,684.763..83,684.796 rows=50 loops=1)

  • Index Cond: (legal_entity_id = ANY ('{101,102,103}'::bigint[]))
  • Filter: ((primary_vendor_code)::text = ANY ('{RANDO,BTDS,DENDO,ANQAB,NEWQ1,1UGLV,MHILL}'::text[]))
  • Rows Removed by Filter: 4585041
5. 1.150 1.150 ↑ 1.0 1 50

Index Scan using uniq_distributor_invoice on distributor_invoices di (cost=0.57..2.62 rows=1 width=613) (actual time=0.016..0.023 rows=1 loops=50)

  • Index Cond: (((diws.vendor_invoice_number)::text = (vendor_invoice_number)::text) AND (diws.legal_entity_id = legal_entity_id))
  • Filter: ((diws.primary_vendor_code)::text = btrim((primary_vendor_code)::text))
  • Rows Removed by Filter: 6
6. 0.000 0.150 ↓ 0.0 0 50

Hash Left Join (cost=3.49..60.30 rows=55 width=160) (actual time=0.003..0.003 rows=0 loops=50)

  • Hash Cond: (attr.attribute_id = attrmetadata.attribute_id)
7. 0.100 0.100 ↓ 0.0 0 50

Index Scan using pk_attribute on invoice_attributes attr (cost=0.57..56.63 rows=55 width=130) (actual time=0.002..0.002 rows=0 loops=50)

  • Index Cond: ((di.invoice_id = invoice_id) AND (diws.legal_entity_id = legal_entity_id))
8. 0.035 0.055 ↓ 1.2 106 1

Hash (cost=1.85..1.85 rows=85 width=38) (actual time=0.055..0.055 rows=106 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
9. 0.020 0.020 ↓ 1.2 106 1

Seq Scan on invoice_attributes_metadata attrmetadata (cost=0.00..1.85 rows=85 width=38) (actual time=0.005..0.020 rows=106 loops=1)

Planning time : 0.973 ms