My system takes too long to retrieve data.
nwene
PROOP

5 months ago

I am running a read operation on my system but It takes about 60 seconds to fetch one record from DB. My DB table contains about 2 million records. I have increased my postgres volume to 50GB.

Solved$10 Bounty

Pinned Solution

fra
HOBBY

5 months ago

I think that's the problem, if you need to search for a row in a lot of rows you should use an index, it helps the search operation...given you have 5mil rows you should pay attention how you add the index as it might block the table, have a look to this thread:

https://dba.stackexchange.com/questions/333044/what-is-the-difference-between-create-index-and-create-index-concurrently-in-pos

4 Replies

Railway
BOT

5 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 5 months ago


fra
HOBBY

5 months ago

do you have indexes in the table? are you using the internal or external url to connect to the db?


shamanandrey
HOBBY

5 months ago

This is probably an indexing/optimization issue. Honestly without knowing more about how your system works it would be pretty hard to diagnose the issue.


fra

do you have indexes in the table? are you using the internal or external url to connect to the db?

nwene
PROOP

5 months ago

I am using an internal url connection. I don't have indexes


fra
HOBBY

5 months ago

I think that's the problem, if you need to search for a row in a lot of rows you should use an index, it helps the search operation...given you have 5mil rows you should pay attention how you add the index as it might block the table, have a look to this thread:

https://dba.stackexchange.com/questions/333044/what-is-the-difference-between-create-index-and-create-index-concurrently-in-pos


Status changed to Solved brody 5 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...