explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fUV

Settings
# exclusive inclusive rows x rows loops node
1. 0.781 198.074 ↑ 10,583.3 24 1

Aggregate (cost=89,215.16..96,897.39 rows=254,000 width=61) (actual time=196.96..198.074 rows=24 loops=1)

2. 1.913 197.293 ↑ 204.5 2,515 1

Sort (cost=89,215.16..90,500.72 rows=514,223 width=53) (actual time=196.813..197.293 rows=2,515 loops=1)

  • Sort Key: "*SELECT* 1".name, t1.id
  • Sort Method: quicksort Memory: 293kB
3. 1.320 195.380 ↑ 204.5 2,515 1

Hash Join (cost=20,789.93..30,391.88 rows=514,223 width=53) (actual time=186.607..195.38 rows=2,515 loops=1)

4. 2.753 194.053 ↑ 204.5 2,515 1

Merge Join (cost=20,751.35..28,998.96 rows=514,223 width=21) (actual time=186.593..194.053 rows=2,515 loops=1)

5. 1.010 177.128 ↑ 7.7 2,515 1

Merge Append (cost=19,999.06..20,484.98 rows=19,437 width=29) (actual time=172.808..177.128 rows=2,515 loops=1)

6. 0.706 146.745 ↑ 10.1 1,578 1

Subquery Scan on *SELECT* 1 (cost=12,859.12..13,138.86 rows=15,985 width=29) (actual time=144.531..146.745 rows=1,578 loops=1)

7. 1.029 146.039 ↑ 10.1 1,578 1

Unique (cost=12,859.12..12,979.01 rows=15,985 width=161) (actual time=144.53..146.039 rows=1,578 loops=1)

8. 1.894 145.010 ↑ 7.1 2,258 1

Sort (cost=12,859.12..12,899.08 rows=15,985 width=161) (actual time=144.529..145.01 rows=2,258 loops=1)

  • Sort Key: i.consent_id, p.category
  • Sort Method: quicksort Memory: 333kB
9. 4.328 143.116 ↑ 7.1 2,258 1

Hash Join (cost=2,914.05..11,743.01 rows=15,985 width=161) (actual time=51.121..143.116 rows=2,258 loops=1)

10. 45.521 122.787 ↑ 1.1 16,419 1

Merge Join (cost=1,607.45..10,342.99 rows=17,793 width=28) (actual time=11.874..122.787 rows=16,419 loops=1)

11. 61.550 61.550 ↑ 1.0 167,505 1

Index Scan using temp_consentdb_cmp_cookie_info_pkey1 on consentdb_cmp_cookie_info p (cost=0.42..8,608.39 rows=167,598 width=24) (actual time=0.009..61.55 rows=167,505 loops=1)

12. 10.496 15.716 ↓ 1.0 18,060 1

Sort (cost=1,607.03..1,651.51 rows=17,793 width=20) (actual time=11.86..15.716 rows=18,060 loops=1)

  • Sort Key: i.property_id
  • Sort Method: quicksort Memory: 2,179kB
13. 5.220 5.220 ↓ 1.0 18,060 1

Seq Scan on consentdb_cmp_consented_item i (cost=0..350.93 rows=17,793 width=20) (actual time=0.004..5.22 rows=18,060 loops=1)

14. 8.103 16.001 ↓ 1.0 21,168 1

Hash (cost=996.64..996.64 rows=20,664 width=38) (actual time=16.001..16.001 rows=21,168 loops=1)

15. 7.898 7.898 ↓ 1.0 21,168 1

Seq Scan on consentdb_cmp_cookie_category c (cost=0..996.64 rows=20,664 width=38) (actual time=0.006..7.898 rows=21,168 loops=1)

16. 0.427 29.373 ↑ 3.7 937 1

Subquery Scan on *SELECT* 2 (cost=7,139.93..7,200.34 rows=3,452 width=29) (actual time=28.274..29.373 rows=937 loops=1)

17. 0.458 28.946 ↑ 3.7 937 1

Unique (cost=7,139.93..7,165.82 rows=3,452 width=161) (actual time=28.273..28.946 rows=937 loops=1)

18. 0.916 28.488 ↑ 3.6 969 1

Sort (cost=7,139.93..7,148.56 rows=3,452 width=161) (actual time=28.272..28.488 rows=969 loops=1)

  • Sort Key: i_1.consent_id, p_1.category
  • Sort Method: quicksort Memory: 128kB
19. 1.417 27.572 ↑ 3.6 969 1

Hash Join (cost=1,307.02..6,937.07 rows=3,452 width=161) (actual time=16.137..27.572 rows=969 loops=1)

20. 5.225 10.107 ↓ 1.0 3,915 1

Nested Loop (cost=0.42..5,610.3 rows=3,842 width=28) (actual time=0.025..10.107 rows=3,915 loops=1)

21. 0.948 0.948 ↓ 1.0 3,934 1

Seq Scan on consentdb_cmp_consented_item_history i_1 (cost=0..77.42 rows=3,842 width=20) (actual time=0.009..0.948 rows=3,934 loops=1)

22. 3.934 3.934 ↑ 1.0 1 3,934

Index Scan using temp_consentdb_cmp_cookie_info_pkey1 on consentdb_cmp_cookie_info p_1 (cost=0.42..1.44 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=3,934)

  • Index Cond: (property_id = i_1.property_id)
23. 8.116 16.048 ↓ 1.0 21,168 1

Hash (cost=996.64..996.64 rows=20,664 width=38) (actual time=16.048..16.048 rows=21,168 loops=1)

24. 7.932 7.932 ↓ 1.0 21,168 1

Seq Scan on consentdb_cmp_cookie_category c_1 (cost=0..996.64 rows=20,664 width=38) (actual time=0.004..7.932 rows=21,168 loops=1)

25. 3.429 14.172 ↓ 1.3 6,840 1

Sort (cost=752.3..765.53 rows=5,291 width=8) (actual time=12.855..14.172 rows=6,840 loops=1)

  • Sort Key: consentdb_cmp_consent.id
  • Sort Method: quicksort Memory: 443kB
26. 3.051 10.743 ↓ 1.0 5,337 1

Hash Join (cost=212.65..425.07 rows=5,291 width=8) (actual time=3.199..10.743 rows=5,337 loops=1)

27. 2.411 4.545 ↓ 1.0 6,529 1

Append (cost=0..195.48 rows=6,448 width=12) (actual time=0.006..4.545 rows=6,529 loops=1)

28. 1.718 1.718 ↓ 1.0 5,187 1

Seq Scan on consentdb_cmp_consent consentdb_cmp_consent (cost=0..154.42 rows=5,142 width=12) (actual time=0.005..1.718 rows=5,187 loops=1)

29. 0.416 0.416 ↓ 1.0 1,342 1

Seq Scan on consentdb_cmp_consent_history consentdb_cmp_consent_history (cost=0..41.06 rows=1,306 width=12) (actual time=0.004..0.416 rows=1,342 loops=1)

30. 1.482 3.147 ↓ 1.0 5,337 1

Hash (cost=146.1..146.1 rows=5,324 width=4) (actual time=3.146..3.147 rows=5,337 loops=1)

31. 1.665 1.665 ↓ 1.0 5,337 1

Seq Scan on consentdb_cmp_consent_activity t3 (cost=0..146.1 rows=5,324 width=4) (actual time=0.006..1.665 rows=5,337 loops=1)

  • Filter: (type_id = 1)
32. 0.003 0.007 ↑ 423.3 3 1

Hash (cost=22.7..22.7 rows=1,270 width=36) (actual time=0.006..0.007 rows=3 loops=1)

33. 0.004 0.004 ↑ 423.3 3 1

Seq Scan on consentdb_cmp_consented_item_activity_type t1 (cost=0..22.7 rows=1,270 width=36) (actual time=0.003..0.004 rows=3 loops=1)

Planning time : 0.948 ms
Execution time : 198.236 ms