explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 88jR

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.022 ↓ 0.0 3 1

Table scan on tmp (cost=0..0 rows=0 width=0) (actual time=0.000..0.022 rows=3 loops=1)

2. 0.359 0.360 ↓ 0.0 3 1

Materialize (cost=0..0 rows=0 width=0) (actual time=0.338..0.360 rows=3 loops=1)

  • -> Select #3 (subquery in projection; dependent)
  • -> Select #4 (subquery in projection; dependent)
3. 0.000 0.001 ↓ 0.0 3 1

Table scan on <temporary> (cost=0..0 rows=0 width=0) (actual time=0.001..0.001 rows=3 loops=1)

4. 0.301 0.322 ↓ 0.0 3 1

Temporary table with deduplication (cost=0..0 rows=0 width=0) (actual time=0.321..0.322 rows=3 loops=1)

5. 0.021 0.021 ↓ 0.0 15 1

Table scan on a (cost=1.75 rows=15) (cost=0..0 rows=0 width=0) (actual time=0.018..0.021 rows=15 loops=1)

6. 0.000 0.120 ↓ 0.0 1 15

Aggregate: count(0) (cost=0..0 rows=0 width=0) (actual time=0.008..0.008 rows=1 loops=15)

7. 0.060 0.120 ↓ 0.0 6 15

Filter: (date_format(maintable_OZ4AZ.DateJoined,'%m') = date_format(a.DateJoined,'%m')) (cost=1.75 rows=15) (cost=0..0 rows=0 width=0) (actual time=0.004..0.008 rows=6 loops=15)

8. 0.060 0.060 ↓ 0.0 15 15

Table scan on maintable_OZ4AZ (cost=1.75 rows=15) (cost=0..0 rows=0 width=0) (actual time=0.002..0.004 rows=15 loops=15)

9. 0.015 0.135 ↓ 0.0 1 15

Aggregate: count(0) (cost=0..0 rows=0 width=0) (actual time=0.009..0.009 rows=1 loops=15)

10. 0.060 0.120 ↓ 0.0 2 15

Filter: (date_format(maintable_OZ4AZ.DateJoined,'%m') = date_format((a.DateJoined - interval 1 month),'%m')) (cost=1.75 rows=15) (cost=0..0 rows=0 width=0) (actual time=0.005..0.008 rows=2 loops=15)

11. 0.060 0.060 ↓ 0.0 15 15

Table scan on maintable_OZ4AZ (cost=1.75 rows=15) (cost=0..0 rows=0 width=0) (actual time=0.002..0.004 rows=15 loops=15)