Replies: 1 comment
-
Ok, so you return around 6000 entries per the playlist? (looking at your numbers). One thing you could skip is providing a return model in Fastapi cause it enforces the second round of parsing/validation of the data and you are sure you are already validated with ormar (although that breaks the API docs default behavior although that can probably be fixed on the side). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there !
I'm in the situation where I have fairly simple Models, and I try to create a query but it takes around
1s
to run, which I think is pretty long for the amount of data I have. Maybe I'm doing something bad.I have an index on the
scraped_date
attribute, so I don't know why it's slow ...I have around ~ 587 391 Entries, 356 Sources and 100 Playlists.
Here's the code I try to run :
And here are a simplified version of my models :
Would you have an idea ? Or someway I could find a way to optimize this ? Maybe I'm skipping something .
Thanks for your time 🙏
Beta Was this translation helpful? Give feedback.
All reactions