MEDIUM: No pagination on core list endpoints - returns all records #78

Closed
opened 2026-05-31 12:03:44 -05:00 by null · 0 comments
Owner

Bug Description

Several core API endpoints return ALL records for a user with no pagination or limit:

  • GET /api/bills - returns all bills with correlated subquery (has_history_ranges, has_merchant_rule)
  • GET /api/categories - returns all categories
  • GET /api/subscriptions - returns all subscriptions
  • GET /api/tracker - returns full tracker data with payment aggregation

The bills query is especially expensive as it includes two EXISTS subqueries per row.

Impact

Performance degradation as user data grows. The tracker endpoint aggregates payment data across all months.

Add pagination support (limit/offset or cursor-based) to list endpoints. Consider adding a lightweight summary endpoint for the tracker that returns only the current month data.

## Bug Description Several core API endpoints return ALL records for a user with no pagination or limit: - GET /api/bills - returns all bills with correlated subquery (has_history_ranges, has_merchant_rule) - GET /api/categories - returns all categories - GET /api/subscriptions - returns all subscriptions - GET /api/tracker - returns full tracker data with payment aggregation The bills query is especially expensive as it includes two EXISTS subqueries per row. ## Impact Performance degradation as user data grows. The tracker endpoint aggregates payment data across all months. ## Recommended Fix Add pagination support (limit/offset or cursor-based) to list endpoints. Consider adding a lightweight summary endpoint for the tracker that returns only the current month data.
null added the
priority:medium
backend
labels 2026-05-31 12:03:44 -05:00
null closed this issue 2026-06-03 22:25:02 -05:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/BillTracker#78
No description provided.