explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3rF2 : asd

Settings
# exclusive inclusive rows x rows loops node
1. 11.743 65,473.097 ↑ 1.0 100,000 1

Limit (cost=1.42..573,652.13 rows=100,000 width=612) (actual time=1.196..65,473.097 rows=100,000 loops=1)

2. 30,432.424 65,461.354 ↑ 35.7 100,000 1

Nested Loop (cost=1.42..20,474,857.33 rows=3,569,220 width=612) (actual time=1.196..65,461.354 rows=100,000 loops=1)

  • Join Filter: (results.user_uuid = (users.uuid)::uuid)
  • Rows Removed by Join Filter: 52399491
3. 28,828.427 32,528.930 ↑ 13.6 100,000 1

Nested Loop (cost=1.42..6,171,171.12 rows=1,359,703 width=542) (actual time=0.488..32,528.930 rows=100,000 loops=1)

  • Join Filter: (results.tag_uuid = (tags.uuid)::uuid)
  • Rows Removed by Join Filter: 49799822
4. 55.002 1,300.503 ↑ 5.4 100,000 1

Nested Loop (cost=1.42..732,343.30 rows=544,971 width=506) (actual time=0.090..1,300.503 rows=100,000 loops=1)

5. 62.837 1,045.501 ↑ 5.4 100,000 1

Nested Loop (cost=1.12..555,661.09 rows=544,971 width=467) (actual time=0.081..1,045.501 rows=100,000 loops=1)

6. 54.547 782.664 ↑ 5.4 100,000 1

Nested Loop (cost=0.84..384,377.45 rows=544,971 width=336) (actual time=0.071..782.664 rows=100,000 loops=1)

7. 309.093 528.117 ↑ 5.4 100,000 1

Nested Loop Left Join (cost=0.56..223,017.61 rows=544,971 width=316) (actual time=0.063..528.117 rows=100,000 loops=1)

  • Join Filter: (postponed.result_uuid = results.uuid)
  • Rows Removed by Join Filter: 2100000
8. 15.849 119.024 ↑ 5.4 100,000 1

Merge Append (cost=0.56..52,130.82 rows=544,971 width=208) (actual time=0.025..119.024 rows=100,000 loops=1)

  • Sort Key: results.id
9. 0.005 0.005 ↓ 0.0 0 1

Index Scan using results_pkey on results (cost=0.12..8.15 rows=1 width=278) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: ((start_date >= '2018-01-01 00:00:00'::timestamp without time zone) AND (start_date < '2018-02-01 00:00:00'::timestamp without time zone) AND (company_uuid = 'b7fa583e-a144-4ec2-9464-e1e514512fb4'::uuid))
10. 103.170 103.170 ↑ 5.4 100,000 1

Index Scan using p_results_b7fa583e_201801_pkey on p_results_b7fa583e_201801 (cost=0.42..48,035.38 rows=544,970 width=208) (actual time=0.020..103.170 rows=100,000 loops=1)

  • Filter: ((start_date >= '2018-01-01 00:00:00'::timestamp without time zone) AND (start_date < '2018-02-01 00:00:00'::timestamp without time zone) AND (company_uuid = 'b7fa583e-a144-4ec2-9464-e1e514512fb4'::uuid))
11. 99.984 100.000 ↑ 1.0 21 100,000

Materialize (cost=0.00..1.31 rows=21 width=124) (actual time=0.000..0.001 rows=21 loops=100,000)

12. 0.016 0.016 ↑ 1.0 21 1

Seq Scan on postponed (cost=0.00..1.21 rows=21 width=124) (actual time=0.011..0.016 rows=21 loops=1)

13. 200.000 200.000 ↑ 1.0 1 100,000

Index Scan using index_activities_on_uuid on activities (cost=0.28..0.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=100,000)

  • Index Cond: (uuid = results.activity_uuid)
14. 200.000 200.000 ↑ 1.0 1 100,000

Index Scan using index_questions_on_uuid on questions (cost=0.29..0.31 rows=1 width=147) (actual time=0.002..0.002 rows=1 loops=100,000)

  • Index Cond: (uuid = results.question_uuid)
15. 200.000 200.000 ↑ 1.0 1 100,000

Index Scan using index_stores_on_uuid on stores (cost=0.29..0.32 rows=1 width=55) (actual time=0.002..0.002 rows=1 loops=100,000)

  • Index Cond: (uuid = results.store_uuid)
16. 2,399.879 2,400.000 ↑ 1.0 499 100,000

Materialize (cost=0.00..18.48 rows=499 width=52) (actual time=0.000..0.024 rows=499 loops=100,000)

17. 0.121 0.121 ↑ 1.0 499 1

Seq Scan on tags (cost=0.00..15.99 rows=499 width=52) (actual time=0.005..0.121 rows=499 loops=1)

18. 2,499.839 2,500.000 ↑ 1.0 525 100,000

Materialize (cost=0.00..36.88 rows=525 width=86) (actual time=0.000..0.025 rows=525 loops=100,000)

19. 0.161 0.161 ↑ 1.0 525 1

Seq Scan on users (cost=0.00..34.25 rows=525 width=86) (actual time=0.005..0.161 rows=525 loops=1)