explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gsto

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 3,908.265 ↑ 1.0 21 1

Limit (cost=42,987.13..43,342.12 rows=21 width=98) (actual time=3,577.318..3,908.265 rows=21 loops=1)

2. 9.433 3,908.237 ↑ 2.6 21 1

Unique (cost=42,987.13..43,899.97 rows=54 width=98) (actual time=3,577.317..3,908.237 rows=21 loops=1)

3. 3,800.739 3,898.804 ↑ 2.7 67,579 1

Sort (cost=42,987.13..43,443.55 rows=182,569 width=98) (actual time=3,577.315..3,898.804 rows=67,579 loops=1)

  • Sort Key: templatefields.name, results.created_at
  • Sort Method: external merge Disk: 19584kB
4. 51.551 98.065 ↑ 1.0 182,457 1

Hash Join (cost=3.35..7,061.35 rows=182,569 width=98) (actual time=0.039..98.065 rows=182,457 loops=1)

  • Hash Cond: (results.template_field_id = templatefields.id)
5. 46.488 46.488 ↑ 1.0 182,457 1

Seq Scan on results (cost=0.00..4,547.68 rows=182,569 width=79) (actual time=0.009..46.488 rows=182,457 loops=1)

  • Filter: ((deleted IS NULL) AND (device_id = '32da82e5-e05f-4dc5-a6fd-4222f51d6f5e'::uuid))
  • Rows Removed by Filter: 540
6. 0.011 0.026 ↑ 1.0 54 1

Hash (cost=2.67..2.67 rows=54 width=35) (actual time=0.026..0.026 rows=54 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
7. 0.015 0.015 ↑ 1.0 54 1

Seq Scan on templatefields (cost=0.00..2.67 rows=54 width=35) (actual time=0.003..0.015 rows=54 loops=1)

  • Filter: (template_id = '4420f68d-82b0-4d90-9d62-e9999b5a6948'::uuid)