Following is my code :
error_log('before query'.date("H:i:s:ms"));
$response = $client->query(array(
"TableName" => "user",
"KeyConditions" => array(
"userId" => array( "ComparisonOperator" => ComparisonOperator::EQ,
"AttributeValueList" => array(
array(Type::NUMBER => 2)
))),
));
error_log('after query'.date("H:i:s:ms"));
print_r($response);
My tables Read capacity is 6 reads/sec
Output of Error logs
before query 16:05:29:0229
after query 16:05:32:0232
Question: Why it took 3 secs to read the user for first time? If I add one more query after my first query then it take less than 1 sec to respond.
Any light on the path would be helpful
-Thanks