Open kontrollanten opened 6 months ago
Hi,
Can you provide the output of your sql query with EXPLAIN ANALYZE
?
Can you also provide logs to see what API request is responsible for this SQL call?
Can you also test if the query is slow if you change ORDER BY "similarity" DESC, "VideoPlaylistModel"."id" ASC;
to "VideoPlaylistModel"."createdAt" DESC, "VideoPlaylistModel"."id" ASC
(in the inner + outer queries)
There's a lot of content in our access logs so hard to pin point which API call is responsible. But I'm pretty sure it's one of the GET /api/v1/search calls. When I scrolled through the pagination on our search page it went slow and new slow logs appeared.
Describe the current behavior
In our postgres logs we see a lot of the following slow queries:
They usually takes ~1 second to run.
Steps to reproduce
No response
Describe the expected behavior
No response
Additional information
PeerTube instance:
Browser name, version and platforms on which you could reproduce the bug:
Link to browser console log if relevant:
Link to server log if relevant (
journalctl
or/var/www/peertube/storage/logs/
):