Forsinkelsen er den lange tid, det tager at etablere en databaseforbindelse.
1,5 sekund er ret halt. Men det behøver ikke være en dræber, for du bør bruge en forbindelsespulje og holde databasesessionerne åbne.
For at være sikker kan du sammenligne resultatet med
psql -U [email protected] -h my-server.postgres.database.azure.com database_name <<EOF
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
SELECT count(*), clock_timestamp() FROM table_name;
EOF
Det burde være hurtigere. Forskellen ville være forbindelsestiden.