| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
CREATE INDEX IF NOT EXISTS idx_users_suspended |
| 5 |
ON users(suspended_at) WHERE suspended_at IS NOT NULL; |
| 6 |
|
| 7 |
|
| 8 |
CREATE INDEX IF NOT EXISTS idx_posts_author_created |
| 9 |
ON posts(author_id, created_at); |
| 10 |
|
| 11 |
CREATE INDEX IF NOT EXISTS idx_post_footnotes_author_created |
| 12 |
ON post_footnotes(author_id, created_at); |
| 13 |
|
| 14 |
|
| 15 |
CREATE INDEX IF NOT EXISTS idx_images_uploader_created |
| 16 |
ON images(uploader_id, created_at); |
| 17 |
|
| 18 |
|
| 19 |
CREATE INDEX IF NOT EXISTS idx_community_bans_type_lookup |
| 20 |
ON community_bans(community_id, user_id, ban_type); |
| 21 |
|