explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qTaL

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

Append (cost=132,242.31..23,896,781.59 rows=5 width=40) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Aggregate (cost=132,242.31..132,242.32 rows=1 width=40) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Seq Scan on user_invitations (cost=0.00..121,229.45 rows=4,405,145 width=10) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Aggregate (cost=11,022,494.57..11,022,494.58 rows=1 width=40) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.00..11,016,576.99 rows=2,367,030 width=0) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Unique (cost=0.43..172,759.84 rows=2,367,030 width=10) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Only Scan using user_invitations_idx on user_invitations user_invitations_1 (cost=0.43..161,746.98 rows=4,405,145 width=10) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Only Scan using users_json_user_id_idx on users_json (cost=0.57..4.56 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (user_id = user_invitations_1.user_id)
9. 0.000 0.000 ↓ 0.0

Aggregate (cost=132,488.63..132,488.64 rows=1 width=40) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on user_invitations user_invitations_2 (cost=0.00..132,242.31 rows=98,528 width=10) (actual rows= loops=)

  • Filter: (is_processed = 'N'::text)
11. 0.000 0.000 ↓ 0.0

Aggregate (cost=143,008.86..143,008.87 rows=1 width=40) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on user_invitations user_invitations_3 (cost=0.00..132,242.31 rows=4,306,617 width=10) (actual rows= loops=)

  • Filter: (is_processed = 'Y'::text)
13. 0.000 0.000 ↓ 0.0

Aggregate (cost=12,466,547.13..12,466,547.14 rows=1 width=40) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=237,576.02..12,460,659.14 rows=2,355,195 width=10) (actual rows= loops=)

  • Hash Cond: ((u.user_id)::text = user_invitations_4.user_id)
15. 0.000 0.000 ↓ 0.0

Seq Scan on users_json u (cost=0.00..11,143,922.70 rows=83,809,861 width=10) (actual rows= loops=)

  • Filter: ((data_json -> 'invitations'::text) IS NOT NULL)
16. 0.000 0.000 ↓ 0.0

Hash (cost=196,430.14..196,430.14 rows=2,367,030 width=10) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Unique (cost=0.43..172,759.84 rows=2,367,030 width=10) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Only Scan using user_invitations_idx on user_invitations user_invitations_4 (cost=0.43..161,746.98 rows=4,405,145 width=10) (actual rows= loops=)