I have two Postgres databases. In one, I have two tables, each of which contains about 8,000,000 rows, and the account on any of them takes about a second. In another Postgres database, there are tables that make up 1,000,000 rows, and count - 10, and one table - about 6,000,000 rows, and the account takes 3 minutes to run. What factors determine how long it takes? They are on different machines, but the database, which takes more time, is on a faster machine.
I read about how counts are generally slow, but it seems strange to me. I cannot use a workaround because I use django and it does an admin account which takes forever and makes it useful.
Any information on this would be helpful.
source
share