explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 03r7

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.712 ↓ 0.0 0 1

Unique (cost=671,168.66..671,168.71 rows=1 width=16) (actual time=0.712..0.712 rows=0 loops=1)

2. 0.007 0.712 ↓ 0.0 0 1

Sort (cost=671,168.66..671,168.68 rows=7 width=16) (actual time=0.712..0.712 rows=0 loops=1)

  • Sort Key: user_documents.documentid, (count(user_profiles_1.userid))
  • Sort Method: quicksort Memory: 25kB
3. 0.000 0.705 ↓ 0.0 0 1

Nested Loop (cost=670,770.52..671,168.56 rows=7 width=16) (actual time=0.705..0.705 rows=0 loops=1)

4. 0.001 0.705 ↓ 0.0 0 1

Nested Loop Left Join (cost=670,770.52..670,789.78 rows=1 width=16) (actual time=0.704..0.705 rows=0 loops=1)

  • Join Filter: (user_documents.documentid = user_documents_1.documentid)
5. 0.000 0.704 ↓ 0.0 0 1

Nested Loop (cost=0.87..20.09 rows=1 width=8) (actual time=0.704..0.704 rows=0 loops=1)

  • Join Filter: (user_profiles.user_documentid = user_documents.user_documentid)
6. 0.704 0.704 ↓ 0.0 0 1

Index Scan using i_user_documents_userid on user_documents (cost=0.43..11.63 rows=1 width=12) (actual time=0.704..0.704 rows=0 loops=1)

  • Index Cond: (userid = 25,674,142)
  • Filter: (validation_status = 8)
  • Rows Removed by Filter: 1
7. 0.000 0.000 ↓ 0.0 0

Index Scan using i_user_profiles_userid on user_profiles (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (userid = 25,674,142)
8. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=670,769.65..670,769.67 rows=1 width=12) (never executed)

  • Group Key: user_documents_1.documentid
9. 0.000 0.000 ↓ 0.0 0

Sort (cost=670,769.65..670,769.65 rows=1 width=8) (never executed)

  • Sort Key: user_documents_1.documentid
10. 0.000 0.000 ↓ 0.0 0

Gather (cost=379,726.67..670,769.64 rows=1 width=8) (never executed)

  • Workers Planned: 5
  • Workers Launched: 0
11. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=378,726.67..669,769.54 rows=1 width=8) (never executed)

  • Hash Cond: ((user_documents_1.user_documentid = user_profiles_1.user_documentid) AND (user_documents_1.userid = user_profiles_1.userid))
12. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on user_documents user_documents_1 (cost=0.00..235,271.57 rows=1,534,533 width=12) (never executed)

  • Filter: (validation_status = ANY ('{1,8}'::integer[]))
13. 0.000 0.000 ↓ 0.0 0

Hash (cost=220,320.07..220,320.07 rows=8,378,507 width=8) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_profiles user_profiles_1 (cost=0.00..220,320.07 rows=8,378,507 width=8) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Append (cost=0.00..378.71 rows=7 width=4) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Seq Scan on orders (cost=0.00..362.00 rows=1 width=4) (never executed)

  • Filter: ((creation_date >= '2020-06-01 00:00:00'::timestamp without time zone) AND (creation_date <= '2020-06-23'::date) AND (userid = 25,674,142) AND (status = 0))
17. 0.000 0.000 ↓ 0.0 0

Index Only Scan using orders_2020_06_i_order_u_s_i_c on orders_2020_06 (cost=0.56..16.71 rows=6 width=4) (never executed)

  • Index Cond: ((userid = 25,674,142) AND (status = 0) AND (creation_date >= '2020-06-01 00:00:00'::timestamp without time zone) AND (creation_date <= '2020-06-23'::date))
  • Heap Fetches: 0
Planning time : 15.687 ms
Execution time : 0.812 ms