explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ch3Y

Settings
# exclusive inclusive rows x rows loops node
1. 58.740 178,525.838 ↓ 445.0 257,230 1

Subquery Scan on tt (cost=6,305,190.97..6,309,522.93 rows=578 width=252) (actual time=176,729.299..178,525.838 rows=257,230 loops=1)

  • Filter: (tt.row_no = 1)
  • Rows Removed by Filter: 160288
2.          

CTE res

3. 0.000 171,910.403 ↓ 3.6 417,518 1

Gather (cost=1,000.00..6,279,740.73 rows=115,519 width=244) (actual time=309.963..171,910.403 rows=417,518 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 172,395.488 172,395.488 ↓ 2.9 139,173 3

Parallel Seq Scan on pbi_results results (cost=0.00..6,267,188.83 rows=48,133 width=244) (actual time=304.414..172,395.488 rows=139,173 loops=3)

  • Filter: ((document ->> 'client_id'::text) = 'orbico_cz'::text)
  • Rows Removed by Filter: 7866706
5. 575.527 178,467.098 ↓ 3.6 417,518 1

WindowAgg (cost=25,450.24..28,338.22 rows=115,519 width=252) (actual time=176,729.296..178,467.098 rows=417,518 loops=1)

6. 4,682.114 177,891.571 ↓ 3.6 417,518 1

Sort (cost=25,450.24..25,739.04 rows=115,519 width=244) (actual time=176,729.268..177,891.571 rows=417,518 loops=1)

  • Sort Key: res.product_internal_code, res.results_shop, res.results_date, res.results_price_vat
  • Sort Method: external merge Disk: 242160kB
7. 173,209.457 173,209.457 ↓ 3.6 417,518 1

CTE Scan on res (cost=0.00..2,310.38 rows=115,519 width=244) (actual time=309.970..173,209.457 rows=417,518 loops=1)

Planning time : 0.240 ms
Execution time : 178,545.374 ms