explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IuD3

Settings
# exclusive inclusive rows x rows loops node
1. 3.147 47.574 ↑ 1.8 2,533 1

GroupAggregate (cost=29,176.46..29,291.26 rows=4,592 width=311) (actual time=43.119..47.574 rows=2,533 loops=1)

  • Group Key: "RumResult".id, "RumPage".url, "Device"."userAgent
2. 2.272 44.427 ↑ 1.5 2,979 1

Sort (cost=29,176.46..29,187.94 rows=4,592 width=311) (actual time=43.105..44.427 rows=2,979 loops=1)

  • Sort Key: "RumResult".id, "RumPage".url, "Device"."userAgent
  • Sort Method: quicksort Memory: 1,368kB
3. 11.019 42.155 ↑ 1.5 2,979 1

Gather (cost=4,537.76..28,897.15 rows=4,592 width=311) (actual time=19.838..42.155 rows=2,979 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 0.329 31.136 ↑ 1.8 1,490 2 / 2

Hash Join (cost=3,537.76..27,437.95 rows=2,701 width=311) (actual time=19.219..31.136 rows=1,490 loops=2)

  • Hash Cond: ("RumResultUserRoles"."rumSiteUserRoleId" = "RumSiteUserRole".id)
5. 0.000 30.793 ↑ 1.8 1,490 2 / 2

Nested Loop (cost=3,536.65..27,423.74 rows=2,701 width=287) (actual time=19.172..30.793 rows=1,490 loops=2)

6. 1.951 28.488 ↑ 2.1 1,266 2 / 2

Merge Join (cost=3,536.22..6,302.60 rows=2,671 width=279) (actual time=19.153..28.488 rows=1,266 loops=2)

  • Merge Cond: ("RumPage".id = "RumResult"."rumPageId")
7. 7.262 7.262 ↑ 1.2 32,070 2 / 2

Parallel Index Scan using "RumPage_pkey" on "RumPage" (cost=0.29..2,623.96 rows=39,399 width=107) (actual time=0.015..7.262 rows=32,070 loops=2)

8. 0.928 19.275 ↑ 1.8 2,533 2 / 2

Sort (cost=3,535.92..3,547.27 rows=4,540 width=180) (actual time=19.018..19.275 rows=2,533 loops=2)

  • Sort Key: "RumResult"."rumPageId
  • Sort Method: quicksort Memory: 771kB
  • Worker 0: Sort Method: quicksort Memory: 771kB
9. 3.460 18.347 ↑ 1.8 2,533 2 / 2

Merge Join (cost=651.65..3,260.15 rows=4,540 width=180) (actual time=1.819..18.347 rows=2,533 loops=2)

  • Merge Cond: ("Device".id = "RumResult"."deviceId")
10. 12.867 12.867 ↑ 1.1 46,937 2 / 2

Index Scan using "Device_pkey" on "Device" (cost=0.29..2,421.44 rows=50,409 width=144) (actual time=0.010..12.867 rows=46,937 loops=2)

11. 0.669 2.020 ↑ 1.8 2,533 2 / 2

Sort (cost=651.36..662.71 rows=4,540 width=44) (actual time=1.805..2.020 rows=2,533 loops=2)

  • Sort Key: "RumResult"."deviceId
  • Sort Method: quicksort Memory: 294kB
  • Worker 0: Sort Method: quicksort Memory: 294kB
12. 1.351 1.351 ↑ 1.8 2,533 2 / 2

Index Scan using "RumResult_created" on "RumResult" (cost=0.43..375.59 rows=4,540 width=44) (actual time=0.032..1.351 rows=2,533 loops=2)

  • Index Cond: ((created >= '2020-08-01'::date) AND (created <= '2020-08-02'::date))
  • Filter: ("rumSiteId" = 1)
13. 2.533 2.533 ↑ 1.0 1 2,533 / 2

Index Scan using "rumResultIdOnRumResultUserRoles" on "RumResultUserRoles" (cost=0.43..7.90 rows=1 width=16) (actual time=0.001..0.002 rows=1 loops=2,533)

  • Index Cond: ("rumResultId" = "RumResult".id)
14. 0.006 0.014 ↑ 1.0 5 2 / 2

Hash (cost=1.05..1.05 rows=5 width=40) (actual time=0.013..0.014 rows=5 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
15. 0.008 0.008 ↑ 1.0 5 2 / 2

Seq Scan on "RumSiteUserRole" (cost=0.00..1.05 rows=5 width=40) (actual time=0.007..0.008 rows=5 loops=2)

Planning time : 0.781 ms
Execution time : 47.840 ms