Skip to content

feat: add PostgreSQL events table with analytics indexes#935

Merged
Xoulomon merged 1 commit into
Xoulomon:mainfrom
Mirabliss:perf/db-query-indexing-analytics
May 30, 2026
Merged

feat: add PostgreSQL events table with analytics indexes#935
Xoulomon merged 1 commit into
Xoulomon:mainfrom
Mirabliss:perf/db-query-indexing-analytics

Conversation

@Mirabliss
Copy link
Copy Markdown
Contributor

  • Add migration 001_create_events_table.sql with events table schema
  • Add composite index on (group_id, event_type, created_at) for cycle analytics
  • Add composite index on (member_address, event_type) for member history
  • Add EXPLAIN ANALYZE benchmark script to measure query performance
  • Add database README with usage instructions

Closes #[Performance] Add database query indexing for analytics

Summary

Motivation

Closes #

Type of change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — code restructuring, no behaviour change
  • test — tests only
  • chore — build, deps, tooling
  • perf — performance improvement
  • Breaking change (existing behaviour changes)

Changes

Testing

Smart contract:

cargo test -p stellar-save

Frontend:

cd frontend && npm test run

Manual steps (if applicable):

Checklist

  • cargo fmt run (Rust changes)
  • cargo clippy -- -D warnings passes (Rust changes)
  • npm run lint passes (frontend changes)
  • Tests added or updated for new/changed behaviour
  • CI is green
  • Documentation updated (if behaviour changed)
  • No secrets or .env files staged

Screenshots / recordings

closes #896

- Add migration 001_create_events_table.sql with events table schema
- Add composite index on (group_id, event_type, created_at) for cycle analytics
- Add composite index on (member_address, event_type) for member history
- Add EXPLAIN ANALYZE benchmark script to measure query performance
- Add database README with usage instructions

Closes #[Performance] Add database query indexing for analytics
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Mirabliss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Xoulomon Xoulomon merged commit 5b0b499 into Xoulomon:main May 30, 2026
13 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Performance] Add database query indexing for analytics

2 participants