explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JaO4

Settings
# exclusive inclusive rows x rows loops node
1. 222.477 45,516.808 ↓ 3,273.0 3,273 1

GroupAggregate (cost=140.79..140.84 rows=1 width=64) (actual time=45,233.062..45,516.808 rows=3,273 loops=1)

  • Group Key: gl_activity.cid, gl_activity.property_id, gl_activity.gl_account_id
2. 380.163 45,294.331 ↓ 355,719.0 355,719 1

Sort (cost=140.79..140.80 rows=1 width=36) (actual time=45,232.990..45,294.331 rows=355,719 loops=1)

  • Sort Key: gl_activity.property_id, gl_activity.gl_account_id
  • Sort Method: quicksort Memory: 40079kB
3. 556.859 44,914.168 ↓ 355,719.0 355,719 1

Nested Loop (cost=1.80..140.78 rows=1 width=36) (actual time=316.950..44,914.168 rows=355,719 loops=1)

  • Join Filter: (gat.gl_account_id = ga.id)
4. 382.768 43,290.152 ↓ 355,719.0 355,719 1

Nested Loop (cost=1.52..140.43 rows=1 width=40) (actual time=316.936..43,290.152 rows=355,719 loops=1)

5. 147.531 41,840.227 ↓ 355,719.0 355,719 1

Nested Loop (cost=1.23..132.05 rows=1 width=44) (actual time=316.917..41,840.227 rows=355,719 loops=1)

6. 6.364 6.364 ↓ 1,164.0 1,164 1

Index Scan using uk_gl_account_trees_gl_account_id on gl_account_trees gat (cost=0.42..8.44 rows=1 width=12) (actual time=0.029..6.364 rows=1,164 loops=1)

  • Index Cond: ((cid = 224) AND (gl_tree_id = 232))
7. 201.372 41,686.332 ↓ 306.0 306 1,164

Nested Loop (cost=0.81..123.60 rows=1 width=32) (actual time=20.320..35.813 rows=306 loops=1,164)

8. 48.888 48.888 ↓ 34.0 34 1,164

Function Scan on load_properties load_prop (cost=0.25..1.00 rows=1 width=4) (actual time=0.017..0.042 rows=34 loops=1,164)

  • Filter: ((is_disabled = 0) AND (is_test = 0))
9. 41,436.072 41,436.072 ↓ 9.0 9 39,576

Index Scan using uk_cached_gl_account_periods_all_ids_post_month on cached_gl_account_periods gl_activity (cost=0.56..122.59 rows=1 width=32) (actual time=1.005..1.047 rows=9 loops=39,576)

  • Index Cond: ((cid = 224) AND (property_id = load_prop.property_id) AND (gl_account_id = gat.gl_account_id) AND (gl_book_id = 132) AND (post_month < '2019-10-01'::date) AND (is_temporary = false))
  • Filter: (is_temporary IS FALSE)
10. 1,067.157 1,067.157 ↑ 1.0 1 355,719

Index Scan using idx_gl_branches_id on gl_branches gb (cost=0.29..8.31 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=355,719)

  • Index Cond: (id = gat.gl_branch_id)
  • Filter: (cid = 224)
11. 1,067.157 1,067.157 ↑ 1.0 1 355,719

Index Scan using idx_gl_accounts_id on gl_accounts ga (cost=0.29..0.34 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=355,719)

  • Index Cond: (id = gl_activity.gl_account_id)
  • Filter: ((is_confidential IS FALSE) AND (cid = 224))
  • Rows Removed by Filter: 0
Planning time : 4.775 ms