Update post_view.rs

This commit is contained in:
dullbananas 2024-05-23 06:34:51 -07:00 committed by GitHub
parent c96017c009
commit 319d6b43b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -652,7 +652,7 @@ impl<'a> PostQuery<'a> {
pool: &mut DbPool<'_>,
) -> Result<Option<PostQuery<'a>>, Error> {
// first get one page for the most popular community to get an upper bound for the page end for
// the real query the reason this is needed is that when fetching posts for a single
// the real query. the reason this is needed is that when fetching posts for a single
// community PostgreSQL can optimize the query to use an index on e.g. (=, >=, >=, >=) and
// fetch only LIMIT rows but for the followed-communities query it has to query the index on
// (IN, >=, >=, >=) which it currently can't do at all (as of PG 16). see the discussion