explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gn45

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 20,581.896 ↓ 1.0 2,084,007 1

Gather (cost=111,648.97..3,074,144.90 rows=2,074,042 width=205) (actual time=2,989.334..20,581.896 rows=2,084,007 loops=1)

  • Workers Planned: 5
  • Params Evaluated: $1
  • Workers Launched: 5
2.          

Initplan (forGather)

3. 0.007 0.041 ↑ 1.0 1 1

Result (cost=0.65..0.66 rows=1 width=4) (actual time=0.040..0.041 rows=1 loops=1)

4.          

Initplan (forResult)

5. 0.004 0.034 ↑ 1.0 1 1

Limit (cost=0.56..0.65 rows=1 width=4) (actual time=0.032..0.034 rows=1 loops=1)

6. 0.030 0.030 ↑ 31,829,596.0 1 1

Index Only Scan Backward using "fki_QueriesWeeks_FK_Weeks" on "QueriesWeeks" (cost=0.56..2,664,416.12 rows=31,829,596 width=4) (actual time=0.029..0.030 rows=1 loops=1)

  • Index Cond: ("WeekID" IS NOT NULL)
  • Heap Fetches: 1
7. 1,479.840 20,606.555 ↑ 1.2 347,334 6

Nested Loop Left Join (cost=110,648.32..2,865,740.04 rows=414,808 width=205) (actual time=2,968.274..20,606.555 rows=347,334 loops=6)

8. 738.865 19,126.713 ↑ 1.2 347,334 6

Parallel Hash Left Join (cost=110,647.76..2,533,985.18 rows=414,808 width=205) (actual time=2,968.261..19,126.713 rows=347,334 loops=6)

  • Hash Cond: (mv.id = "QueriesToStatClusterQueries"."StatClusterQueryID")
9. 2,357.964 15,432.758 ↑ 1.2 347,334 6

Nested Loop Left Join (cost=2.26..2,420,557.74 rows=414,808 width=201) (actual time=0.157..15,432.758 rows=347,334 loops=6)

10. 2,610.902 13,074.789 ↑ 1.2 347,334 6

Nested Loop Left Join (cost=1.70..2,164,997.23 rows=414,808 width=166) (actual time=0.133..13,074.789 rows=347,334 loops=6)

11. 7,094.561 10,463.882 ↑ 1.2 347,334 6

Nested Loop Left Join (cost=1.14..1,906,245.01 rows=414,808 width=143) (actual time=0.108..10,463.882 rows=347,334 loops=6)

  • Filter: (qfd."ProfileID" IS NULL)
  • Rows Removed by Filter: 1779764
12. 3,110.870 3,369.306 ↑ 1.2 347,334 6

Nested Loop (cost=0.56..1,594,466.32 rows=416,752 width=139) (actual time=0.044..3,369.306 rows=347,334 loops=6)

13. 258.430 258.430 ↑ 1.2 347,334 6

Parallel Seq Scan on "QueriesExt" qe (cost=0.00..180,548.52 rows=416,752 width=27) (actual time=0.007..258.430 rows=347,334 loops=6)

14. 0.006 0.006 ↑ 1.0 1 2,084,007

Index Scan using clusterstopqueries_id_idx on clusterstopqueries mv (cost=0.56..3.38 rows=1 width=116) (actual time=0.005..0.006 rows=1 loops=2,084,007)

  • Index Cond: (id = qe."ID")
15. 0.015 0.015 ↓ 2.0 6 2,084,007

Index Only Scan using "NKI_QueriesFrequencyData_QueryID_ProfileID_FrequencyID" on "QueriesFrequencyData" qfd (cost=0.57..0.72 rows=3 width=12) (actual time=0.006..0.015 rows=6 loops=2,084,007)

  • Index Cond: ("QueryID" = mv.id)
  • Heap Fetches: 12762594
16. 0.005 0.005 ↑ 1.0 1 2,084,007

Index Scan using "PK_ProfilesQueriesJsonData" on "ProfilesQueriesJsonData" pqd (cost=0.56..0.62 rows=1 width=27) (actual time=0.005..0.005 rows=1 loops=2,084,007)

  • Index Cond: ("QueryID" = mv.id)
17. 0.005 0.005 ↑ 1.0 1 2,084,007

Index Scan using "PK_ProfilesClustersJsonData" on "ProfilesClustersJsonData" pcd (cost=0.56..0.62 rows=1 width=39) (actual time=0.005..0.005 rows=1 loops=2,084,007)

  • Index Cond: ("ClusterID" = mv.clusterid)
18. 1,700.245 2,955.090 ↑ 1.5 1,834,948 6

Parallel Hash (cost=76,240.21..76,240.21 rows=2,752,422 width=8) (actual time=2,955.089..2,955.090 rows=1,834,948 loops=6)

  • Buckets: 16777216 Batches: 1 Memory Usage: 561824kB
19. 1,254.845 1,254.845 ↑ 1.5 1,834,948 6

Parallel Seq Scan on "QueriesToStatClusterQueries" (cost=0.00..76,240.21 rows=2,752,422 width=8) (actual time=0.017..1,254.845 rows=1,834,948 loops=6)

20. 0.002 0.002 ↓ 0.0 0 2,084,007

Index Scan using "NKI_QueriesWeeks_QueryID_WeekID_ComplectTypeID" on "QueriesWeeks" qw (cost=0.56..0.79 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=2,084,007)

  • Index Cond: (("QueryID" = "QueriesToStatClusterQueries"."QueryID") AND ("WeekID" = $1) AND ("ComplectTypeID" IS NULL))