New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call ANALYZE
less often
#3518
Comments
From logs:
But I'm not sure how to reproduce without running many tests in parallel. |
ListDatabases
from tests when checking connectionANALYZE
less
Hey @rumyantseva i'm interested in working on this issue. |
@Aditya1404Sal thank you for your interest! I assigned you, so please feel free to take it. |
To set the
|
I don't think we need any constructor: both the type and the field are exported and directly accessible, and the zero value is good enough. |
For the postgresql backend , |
PostgreSQL schema name is the same as FerretDB database name |
What should be done?
PostgreSQL and SQLite backends call
ANALYZE
on the whole database whendbStats
andcollStats
commands are called. That's slow and not necessary in real usage.Let's call
ANALYZE
only whenDatabase.Stats
andCollection.Stats
are called withRefresh: true
.dbStats
andcollStats
should call those methods withRefresh: true
for now (to do less in this issue), but we might change that in the future.Additionally, we should call
ANALYZE
only on a given list of collections (and given PostgreSQL schema), not on the whole database.Where?
See references to this issue.
Definition of Done
The text was updated successfully, but these errors were encountered: