Having a hard time understanding why PostgreSQL from google cloud services is taking > 400 ms for any simple query (~4-row table) from my PHP code using PDO or pg driver. IP ping averages around 60 ms so it seems it's not a distance problem. Using both PGAdmin and PHP yield around a 400+ ms response time.
$before_conn1 = microtime(true);
$result = pg_query($connector->conn(),$query);
$after_conn1 = microtime(true);
$test = $after_conn1 - $before_conn1;
echo $test;return;
// response time 0.46275 unix timestamp
query looks like this:
SELECT id,clearance from table
literally the table has 4 rows and 2 columns.