explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1rPS

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 2,115.029 ↓ 0.0 0 1

WindowAgg (cost=74,275,415.05..78,810,137.46 rows=259,126,995 width=159) (actual time=2,115.029..2,115.029 rows=0 loops=1)

2. 0.003 2,115.026 ↓ 0.0 0 1

Sort (cost=74,275,415.05..74,923,232.54 rows=259,126,995 width=143) (actual time=2,115.026..2,115.026 rows=0 loops=1)

  • Sort Key: a.rno
  • Sort Method: quicksort Memory: 25kB
3. 7.585 2,115.023 ↓ 0.0 0 1

Merge Join (cost=196,068.29..5,381,717.00 rows=259,126,995 width=143) (actual time=2,115.022..2,115.023 rows=0 loops=1)

  • Merge Cond: ((lower((a.pagelabel)::text)) = (lower((b.c_docdisplayid)::text)))
4. 76.022 145.493 ↑ 1.2 40,000 1

Sort (cost=50,433.96..50,557.93 rows=49,585 width=143) (actual time=132.565..145.493 rows=40,000 loops=1)

  • Sort Key: (lower((a.pagelabel)::text))
  • Sort Method: external merge Disk: 5568kB
5. 69.471 69.471 ↑ 1.2 40,000 1

Seq Scan on temp_opt_10032019095701_72056 a (cost=0.00..46,566.93 rows=49,585 width=143) (actual time=0.094..69.471 rows=40,000 loops=1)

  • Filter: (COALESCE((docbreak)::text, ''::text) <> 'Y'::text)
  • Rows Removed by Filter: 9999
6. 0.011 1,961.945 ↑ 17,134.1 61 1

Materialize (cost=145,634.33..150,860.24 rows=1,045,183 width=12) (actual time=1,961.914..1,961.945 rows=61 loops=1)

7. 1,247.877 1,961.934 ↑ 17,134.1 61 1

Sort (cost=145,634.33..148,247.29 rows=1,045,183 width=12) (actual time=1,961.910..1,961.934 rows=61 loops=1)

  • Sort Key: (lower((b.c_docdisplayid)::text))
  • Sort Method: external merge Disk: 35736kB
8. 479.978 714.057 ↑ 1.0 1,044,906 1

Result (cost=0.00..30,677.27 rows=1,045,183 width=12) (actual time=0.036..714.057 rows=1,044,906 loops=1)

9. 84.914 234.079 ↑ 1.0 1,044,906 1

Append (cost=0.00..30,677.27 rows=1,045,183 width=12) (actual time=0.027..234.079 rows=1,044,906 loops=1)

10. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on t_e20so1_document_datastore_1 b (cost=0.00..10.60 rows=60 width=4) (actual time=0.005..0.005 rows=0 loops=1)

11. 0.150 0.150 ↑ 1.0 997 1

Index Only Scan using t_e20so1_document_datastore_11_c_docdisplayid_idx on t_e20so1_document_datastore_11 b_1 (cost=0.28..25.13 rows=997 width=23) (actual time=0.020..0.150 rows=997 loops=1)

  • Heap Fetches: 0
12. 148.988 148.988 ↑ 1.0 1,043,880 1

Index Only Scan using t_e20so1_document_datastore_12_c_docdisplayid_idx on t_e20so1_document_datastore_12 b_2 (cost=0.42..25,403.03 rows=1,044,067 width=12) (actual time=0.014..148.988 rows=1,043,880 loops=1)

  • Heap Fetches: 0
13. 0.019 0.019 ↑ 1.0 29 1

Seq Scan on t_e20so1_document_datastore_13 b_3 (cost=0.00..2.29 rows=29 width=12) (actual time=0.011..0.019 rows=29 loops=1)

14. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on t_e20so1_document_datastore_default b_4 (cost=0.00..10.30 rows=30 width=218) (actual time=0.003..0.003 rows=0 loops=1)

Planning time : 0.486 ms