explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZJWC

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 7,777.975 ↑ 500.0 1 1

Limit (cost=368,401.85..368,403.10 rows=500 width=98) (actual time=7,777.974..7,777.975 rows=1 loops=1)

  • Buffers: shared hit=44,475 read=348,239 written=3,628
2. 0.014 7,777.973 ↑ 502.0 1 1

Sort (cost=368,401.85..368,403.10 rows=502 width=98) (actual time=7,777.972..7,777.973 rows=1 loops=1)

  • Sort Key: name
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=44,475 read=348,239 written=3,628
3. 7,059.022 7,777.959 ↑ 502.0 1 1

Bitmap Heap Scan on customer (cost=75,866.34..368,379.33 rows=502 width=98) (actual time=7,749.904..7,777.959 rows=1 loops=1)

  • Recheck Cond: ((resellerid = 247,133) AND ((parentkey = '999999999_247131_247133'::text) OR (parentkey ~~ '999999999\_247131\_247133\%'::text)))
  • Filter: ((customerstatus <> 'Deleted'::text) AND ((parentkey = '999999999_247131_247133'::text) OR (parentkey ~~ '999999999\_247131\_247133\%'::text)) A
  • Rows Removed by Filter: 1,490,308
  • Heap Blocks: exact=376,430
  • Buffers: shared hit=44,475 read=348,239 written=3,628
4. 20.752 718.937 ↓ 0.0 0 1

BitmapAnd (cost=75,866.34..75,866.34 rows=100,947 width=0) (actual time=718.937..718.937 rows=0 loops=1)

  • Buffers: shared hit=29 read=16,255
5. 286.424 286.424 ↓ 1.0 1,496,029 1

Bitmap Index Scan on customer_resellerid_key1 (cost=0.00..29,659.40 rows=1,474,528 width=0) (actual time=286.424..286.424 rows=1,496,029 loops=1)

  • Index Cond: (resellerid = 247,133)
  • Buffers: shared hit=20 read=4,843
6. 411.736 411.761 ↓ 0.0 0 1

BitmapOr (cost=46,206.57..46,206.57 rows=1,474,825 width=0) (actual time=411.761..411.761 rows=0 loops=1)

  • Buffers: shared hit=9 read=11,412
  • -> Bitmap Index Scan on customer_parentkey_idx (cost=0.00..46195.52 rows=1,474,528 width=0) (actual time=411.733..411.733 rows=1,498,363 loops
  • Index Cond: (parentkey = '999999999_247131_247133'::text)
  • Buffers: shared hit=6 read=11,411
7. 0.025 0.025 ↓ 0.0 0 1

Bitmap Index Scan on customer_parentkey_idx (cost=0.00..10.80 rows=298 width=0) (actual time=0.025..0.025 rows=0 loops=1)

  • Index Cond: (parentkey = '999999999_247131_247133%'::text)
  • Buffers: shared hit=3 read=1
Planning time : 0.263 ms
Execution time : 7,785.900 ms