explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uac5

Settings
# exclusive inclusive rows x rows loops node
1. 0.043 390.632 ↑ 443.3 213 1

Nested Loop (cost=0.71..61,900.17 rows=94,414 width=548) (actual time=384.986..390.632 rows=213 loops=1)

2. 0.039 385.051 ↓ 2.1 213 1

Subquery Scan on ANY_subquery (cost=0.29..61,053.67 rows=100 width=4) (actual time=384.943..385.051 rows=213 loops=1)

3. 21.480 385.012 ↓ 2.1 213 1

HashSetOp Intersect (cost=0.29..61,052.67 rows=100 width=8) (actual time=384.942..385.012 rows=213 loops=1)

4. 10.818 363.532 ↓ 1.2 87,291 1

Append (cost=0.29..60,863.32 rows=75,740 width=8) (actual time=0.028..363.532 rows=87,291 loops=1)

5. 0.065 0.159 ↓ 4.0 400 1

Subquery Scan on *SELECT* 1 (cost=0.29..9.82 rows=100 width=8) (actual time=0.028..0.159 rows=400 loops=1)

6. 0.067 0.094 ↓ 4.0 400 1

ProjectSet (cost=0.29..8.82 rows=100 width=4) (actual time=0.027..0.094 rows=400 loops=1)

7. 0.027 0.027 ↓ 2.0 2 1

Index Scan using client_logs_client_id_by_date_index on client_logs (cost=0.29..8.31 rows=1 width=827) (actual time=0.022..0.027 rows=2 loops=1)

  • Index Cond: ((client_id = 2962) AND (change_date > '2018-07-01'::date) AND (change_date < '2018-07-31'::date))
8. 20.891 352.555 ↓ 1.1 86,891 1

Subquery Scan on *SELECT* 2 (cost=1,000.00..60,474.80 rows=75,640 width=8) (actual time=225.029..352.555 rows=86,891 loops=1)

9. 21.606 331.664 ↓ 1.1 86,891 1

Gather (cost=1,000.00..59,718.40 rows=75,640 width=4) (actual time=225.027..331.664 rows=86,891 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
10. 22.712 310.058 ↑ 108.8 28,964 3

ProjectSet (cost=0.00..51,154.40 rows=3,151,700 width=4) (actual time=208.994..310.058 rows=28,964 loops=3)

11. 287.346 287.346 ↑ 1.2 25,547 3

Parallel Seq Scan on patient_logs (cost=0.00..35,159.53 rows=31,517 width=25) (actual time=208.988..287.346 rows=25,547 loops=3)

  • Filter: ((change_date > '2018-07-01'::date) AND (change_date < '2018-07-31'::date))
  • Rows Removed by Filter: 570569
12. 4.686 5.538 ↑ 1.0 1 213

Append (cost=0.43..8.46 rows=1 width=548) (actual time=0.025..0.026 rows=1 loops=213)

13. 0.852 0.852 ↑ 1.0 1 213

Index Scan using changes_y2018_change_id_change_date_idx on changes_y2018 (cost=0.43..8.45 rows=1 width=548) (actual time=0.004..0.004 rows=1 loops=213)

  • Index Cond: ((change_id = "ANY_subquery".unnest) AND (change_date > '2018-07-01'::date) AND (change_date < '2018-07-31'::date))