explain.depesz.com

PostgreSQL's explain analyze made readable

Result: upmH

Settings
# exclusive inclusive rows x rows loops node
1. 75.955 185.025 ↑ 18.7 69,453 1

Nested Loop (cost=6.01..43,517.75 rows=1,297,606 width=33) (actual time=0.056..185.025 rows=69,453 loops=1)

2.          

CTE ids

3. 0.177 0.177 ↑ 2.5 401 1

Result (cost=0.00..5.01 rows=1,000 width=4) (actual time=0.004..0.177 rows=401 loops=1)

4. 0.721 4.409 ↑ 2.5 401 1

Nested Loop (cost=0.43..2,441.50 rows=1,000 width=12) (actual time=0.042..4.409 rows=401 loops=1)

5. 0.480 0.480 ↑ 2.5 401 1

CTE Scan on ids (cost=0.00..20.00 rows=1,000 width=4) (actual time=0.005..0.480 rows=401 loops=1)

6. 3.208 3.208 ↑ 1.0 1 401

Index Scan using ig_accounts_pkey on ig_accounts (cost=0.43..2.41 rows=1 width=8) (actual time=0.004..0.008 rows=1 loops=401)

  • Index Cond: (id = ids.id)
7. 104.661 104.661 ↑ 7.5 173 401

Index Scan using index_ig_posts_on_ig_account_id_and_media_type on ig_posts (cost=0.57..28.09 rows=1,298 width=29) (actual time=0.005..0.261 rows=173 loops=401)

  • Index Cond: (ig_account_id = ig_accounts.id)
Planning time : 0.383 ms
Execution time : 203.896 ms