Answer the question
In order to leave comments, you need to log in
How to speed up query to database in Postgres sql format?
There is a database of more than 100 million lines, you need to make queries to it throughout the database.
How is it possible to speed up requests?
I was advised to index the database.
Can you tell me the best way to make it? Point by point, if possible.
Answer the question
In order to leave comments, you need to log in
It all depends a lot on the content (data organization) of your tables and the queries you make on them. Usually, indexes are built on those fields that are involved in the main queries. The most important thing here is not to overdo it and not create too many indexes, otherwise the insert will slow down.
Indexes are immediately created by primary/secondary keys.
To analyze the database, do explain your requests - https://habrahabr.ru/post/203320/
Well, if there are a lot of requests like LIKE, then it makes sense to index your data in search engines like elasticsearch.
tatiyants.com/postgres-query-plan-visualization
tatiyants.com/pev/#/plans
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question