Commit graph

7 commits

Author SHA1 Message Date
Chad Curtis
baa7968305 Optimize top_authors materialized view for better performance
- Limit materialized view to authors with followers_count > 0 and top 10k records
- Add proper indexes (search GIN, pubkey B-tree, followers_count DESC)
- Use CONCURRENTLY for non-blocking refreshes in cron job
- Reduces sorting overhead and memory usage during refresh

The original materialized view was expensive because it sorted all authors
regardless of follower count. This optimization reduces the dataset to a
manageable size while maintaining search functionality.

Fixes expensive query issue in top_authors materialized view.
2025-09-14 21:11:14 +00:00
P. Reis
7dc56f594b feat: add zaps_amount_cashu to event_stats (with tests)
add zapped_cashu and zaps_amount_cashu field to MastodonStatus
2025-03-25 18:19:40 -03:00
Alex Gleason
affea45a08
Store link previews in the database
Fixes https://gitlab.com/soapbox-pub/ditto/-/issues/301
2025-03-08 19:33:15 -06:00
Alex Gleason
a52fe9fbc6
Try to fix pkey migration 2025-02-23 09:30:00 -06:00
Alex Gleason
02d4235abd
Rename nostr_events_new_pkey to nostr_events_pkey 2025-02-23 09:21:14 -06:00
Alex Gleason
e1c1967a66
db: remove some external deps 2025-02-16 11:42:48 -06:00
Alex Gleason
c59bb421c6
Add @ditto/db package 2025-02-16 00:14:41 -06:00