chrissharp123

Untitled

Jan 5th, 2026
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. QUERY PLAN
  2. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  3. Limit (cost=197080.67..2050351.38 rows=10 width=56) (actual time=250382.564..250382.569 rows=1 loops=1)
  4. -> GroupAggregate (cost=197080.67..3347640.88 rows=17 width=56) (actual time=250382.563..250382.566 rows=1 loops=1)
  5. Group Key: materialized_billable_xact_summary.usr, (sum(materialized_billable_xact_summary.balance_owed))
  6. -> Incremental Sort (cost=197080.67..3347640.54 rows=17 width=56) (actual time=250382.510..250382.524 rows=205 loops=1)
  7. Sort Key: materialized_billable_xact_summary.usr, (sum(materialized_billable_xact_summary.balance_owed))
  8. Presorted Key: materialized_billable_xact_summary.usr
  9. Full-sort Groups: 1 Sort Method: quicksort Average Memory: 27kB Peak Memory: 27kB
  10. Pre-sorted Groups: 1 Sort Method: quicksort Average Memory: 32kB Peak Memory: 32kB
  11. -> Nested Loop (cost=170.71..3347639.78 rows=17 width=56) (actual time=54272.879..250382.418 rows=205 loops=1)
  12. Join Filter: (au.id = mbts.usr)
  13. -> Merge Join (cost=170.15..3347606.54 rows=1 width=44) (actual time=54272.844..250382.251 rows=1 loops=1)
  14. Merge Cond: (materialized_billable_xact_summary.usr = au.id)
  15. -> GroupAggregate (cost=0.57..3346375.76 rows=84859 width=100) (actual time=49.342..250377.910 rows=1530 loops=1)
  16. Group Key: materialized_billable_xact_summary.usr
  17. Filter: (sum(materialized_billable_xact_summary.balance_owed) < '0'::numeric)
  18. Rows Removed by Filter: 1325752
  19. -> Index Scan using money_mat_summary_usr_idx on materialized_billable_xact_summary (cost=0.57..3314556.65 rows=5600094 width=7) (actual time=0.014..247987.317 rows=5569673 loops=1)
  20. Filter: (xact_finish IS NULL)
  21. Rows Removed by Filter: 85698224
  22. -> Sort (cost=169.58..169.81 rows=91 width=8) (actual time=0.522..0.645 rows=96 loops=1)
  23. Sort Key: au.id
  24. Sort Method: quicksort Memory: 27kB
  25. -> Index Scan using actor_usr_home_ou_idx on usr au (cost=0.43..166.62 rows=91 width=8) (actual time=0.051..0.488 rows=98 loops=1)
  26. Index Cond: (home_ou = 394)
  27. Filter: (NOT deleted)
  28. -> Index Scan using money_mat_summary_usr_idx on materialized_billable_xact_summary mbts (cost=0.57..28.75 rows=359 width=20) (actual time=0.027..0.121 rows=205 loops=1)
  29. Index Cond: (usr = materialized_billable_xact_summary.usr)
  30. Planning Time: 0.751 ms
  31. Execution Time: 250382.625 ms
  32. (29 rows)
  33.  
Advertisement
Add Comment
Please, Sign In to add comment