explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tsx7

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 12.513 ↑ 1.0 1 1

Aggregate (cost=8,651.90..8,651.91 rows=1 width=8) (actual time=12.512..12.513 rows=1 loops=1)

2. 0.007 12.501 ↑ 72.3 6 1

Limit (cost=8,645.39..8,646.48 rows=434 width=8) (actual time=12.491..12.501 rows=6 loops=1)

3. 0.031 12.494 ↑ 72.3 6 1

Sort (cost=8,645.39..8,646.48 rows=434 width=8) (actual time=12.489..12.494 rows=6 loops=1)

  • Sort Key: o.id DESC
  • Sort Method: quicksort Memory: 25kB
4. 0.041 12.463 ↑ 72.3 6 1

Hash Semi Join (cost=190.27..8,626.38 rows=434 width=8) (actual time=10.134..12.463 rows=6 loops=1)

  • Hash Cond: (o.id = op."orderRef")
5. 1.540 3.962 ↑ 72.3 6 1

Bitmap Heap Scan on "OrderDO" o (cost=45.65..8,474.16 rows=434 width=8) (actual time=1.643..3.962 rows=6 loops=1)

  • Recheck Cond: ("shopRef" = ANY ('{0,500,1,200,210,220,230,120,100,300,110,111}'::bigint[]))
  • Filter: ((((id)::character varying)::text ~~ '%456%'::text) OR (("shopOrderNo")::text ~~ '%456%'::text) OR (SubPlan 1))
  • Rows Removed by Filter: 1115
  • Heap Blocks: exact=50
6. 0.184 0.184 ↓ 1.6 1,300 1

Bitmap Index Scan on "index_OrderDO_shopRef" (cost=0.00..45.54 rows=834 width=0) (actual time=0.183..0.184 rows=1,300 loops=1)

  • Index Cond: ("shopRef" = ANY ('{0,500,1,200,210,220,230,120,100,300,110,111}'::bigint[]))
7.          

SubPlan (for Bitmap Heap Scan)

8. 2.238 2.238 ↓ 0.0 0 1,119

Index Scan using "index_OrderPropertyDO_orderRef" on "OrderPropertyDO" (cost=0.28..19.73 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=1,119)

  • Index Cond: ("orderRef" = o.id)
  • Filter: (((key)::text = ANY ('{myOrderNo,SAPOrder}'::text[])) AND ((value)::text ~~ '%456%'::text))
  • Rows Removed by Filter: 2
9. 6.780 8.460 ↓ 1.2 1,813 1

Hash (cost=126.42..126.42 rows=1,456 width=8) (actual time=8.460..8.460 rows=1,813 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 87kB
10. 1.680 1.680 ↓ 1.2 1,813 1

Seq Scan on "OrderPosDO" op (cost=0.00..126.42 rows=1,456 width=8) (actual time=0.010..1.680 rows=1,813 loops=1)

  • Filter: ("supplierRef" = ANY ('{1,3000,1211,1212,1000,2000,1200,1210,1100}'::bigint[]))
Planning time : 1.844 ms
Execution time : 12.652 ms