0
我使用php庫設置來自bigquery的查詢。但沒有查詢本身的限制,我得到這個迴應「查詢尚未完成」,其大約10k或更多,但我的頁面應該限制50。如何在bigquery上設置分頁,我跳過,限制。大查詢限制和跳過分頁結果
select * from table skip,limit
$bigQuery = new BigQueryClient([
'projectId' => 'xxxxx',
]);
$datasetId = 'dbxxxx';
$dataset = $bigQuery->dataset($datasetId);
$options = array(
'useLegacySql' => true,
'maxResults' => 50,
'startIndex' => 1
);
$query = "SELECT id FROM [ideas] WHERE date >= '".$datefrom."' AND date <= '".$dateto."' ORDER BY date DESC";
$runquery = $bigQuery->runQuery($query,$options);
例如在mysql查詢中,從表20,10中選擇*,意思是跳過20,限制爲2。 – Boy