-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Labels
Bug (unconfirmed)issues that could not be reproduced yetissues that could not be reproduced yet
Milestone
Description
Describe the bug
While scrolling the site in the normal view and reaching the end of the loaded articles, the next batch takes a few minutes to load.
I was able to track the issue to this query
Which has taken 90 seconds when I ran it using the \timing option directly in psql in my user with millions of rows in the table _entry
FreshRSS/app/Models/TagDAO.php
Lines 208 to 215 in 00c61cf
| $sql = <<<'SQL' | |
| SELECT t.id, t.name, count(e.id) AS unreads | |
| FROM `_tag` t | |
| LEFT OUTER JOIN `_entrytag` et ON et.id_tag = t.id | |
| LEFT OUTER JOIN `_entry` e ON et.id_entry = e.id AND e.is_read = 0 | |
| GROUP BY t.id | |
| ORDER BY t.name | |
| SQL; |
Workaround
I changed count(e.id) AS unreads to 0 AS unreads, since this value is not important for me to see, and the query now takes 18ms.
To Reproduce
- Set up an instance
- Have millions of entries
- Scroll through the "Normal view" and see the long wait times to load the next batch of entries.
Expected behavior
Not have to wait 1 or 2 minutes to read the next batch of articles in my feeds.
FreshRSS version
1.27.2-dev
System information
- Database version: PostgreSQL 17
- PHP version: 8.4.11
- Installation type: Docker compose (image: freshrss/freshrss:edge)
- Browser:Firefox 146
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug (unconfirmed)issues that could not be reproduced yetissues that could not be reproduced yet