Answer the question
In order to leave comments, you need to log in
How to make postgreSQL fetch faster?
Hello guys!
There is a database with accounts that uses postgreSQL based on Yii2. I
'm trying to speed up the selection, but my knowledge is pumping me up.
Tried default btree, tried brin.
There is not much data in the database, throw in your thoughts.
If you need any information, please let me know.
Thank you!
Answer the question
In order to leave comments, you need to log in
What bothers you? 15 ms for such a monstrous select is still excellent, which means there is enough memory for the database.
It's just that you probably don't need to make such requests for each sneeze, somehow caching - and everything will be fine.
You can try to select *
explicitly list the required fields instead, if only some of them are needed.
Still, if the id are listed in order, then replacing in
withbetween
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question