explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aJnB

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 103.205 ↓ 13.3 3,814 1

Gather Merge (cost=21,790.58..21,823.95 rows=286 width=24) (actual time=100.431..103.205 rows=3,814 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1.386 281.199 ↓ 8.9 1,271 3

Sort (cost=20,790.56..20,790.91 rows=143 width=24) (actual time=93.653..93.733 rows=1,271 loops=3)

  • Sort Key: measures.creation
  • Sort Method: quicksort Memory: 165kB
  • Worker 0: Sort Method: quicksort Memory: 140kB
  • Worker 1: Sort Method: quicksort Memory: 138kB
3. 1.678 279.813 ↓ 8.9 1,271 3

Nested Loop (cost=14,936.83..20,785.44 rows=143 width=24) (actual time=66.315..93.271 rows=1,271 loops=3)

4. 1.968 247.710 ↓ 9.2 2,028 3

Hash Join (cost=14,936.41..20,677.85 rows=220 width=40) (actual time=51.165..82.570 rows=2,028 loops=3)

  • Hash Cond: (measures.project = projects.id)
5. 48.027 245.487 ↓ 1.8 2,028 3

Parallel Hash Semi Join (cost=14,935.33..20,671.44 rows=1,100 width=56) (actual time=50.951..81.829 rows=2,028 loops=3)

  • Hash Cond: (measures.id = metadata.measure_id)
6. 45.120 45.120 ↑ 1.3 122,542 3

Parallel Seq Scan on measures (cost=0.00..5,321.77 rows=153,178 width=40) (actual time=0.012..15.040 rows=122,542 loops=3)

7. 6.831 152.340 ↓ 1.8 2,028 3

Parallel Hash (cost=14,921.58..14,921.58 rows=1,100 width=16) (actual time=50.780..50.780 rows=2,028 loops=3)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 416kB
8. 145.509 145.509 ↓ 1.8 2,028 3

Parallel Seq Scan on measure_metadata metadata (cost=0.00..14,921.58 rows=1,100 width=16) (actual time=0.088..48.503 rows=2,028 loops=3)

  • Filter: (((key)::text = 'kpiAlias'::text) AND ((value)::text = 'struct_x_RMS'::text))
  • Rows Removed by Filter: 267816
9. 0.054 0.255 ↓ 5.0 5 3

Hash (cost=1.06..1.06 rows=1 width=16) (actual time=0.085..0.085 rows=5 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.201 0.201 ↓ 5.0 5 3

Seq Scan on projects (cost=0.00..1.06 rows=1 width=16) (actual time=0.065..0.067 rows=5 loops=3)

  • Filter: (client = 'b56ebc8d-07d1-4f25-b693-afb2f544b892'::uuid)
11. 30.425 30.425 ↑ 1.0 1 6,085

Index Scan using measure_values_pkey on measure_values pkis (cost=0.42..0.49 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=6,085)

  • Index Cond: (id = measures.id)
  • Filter: (("timestamp" > '2019-10-05 00:00:00'::timestamp without time zone) AND ("timestamp" < '2019-11-07 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 0
Planning time : 0.695 ms
Execution time : 103.555 ms