Cassandra db PHP 驱动程序,无法对分区键同时使用 ORDER BY 和 IN 限制进行分页查询
Cassandra db PHP driver, cannot page queries with both ORDER BY and a IN restriction on the partition key
我无法使用 datastax PHP 驱动程序获得以下查询的结果,
select * from track where id='35209' and day in (20180314,20180315,20180316) and datetime < '2018-03-15 11:00:00' order by datetime desc limit 1;
error message : "Cannot page queries with both ORDER BY and a IN restriction on the partition key; you must either remove the ORDER BY or the IN and sort client side, or disable paging for this query"
那么 "executeAsync" 如何禁用分页?
您可以通过对 Cluster.Builder
对象调用 withDefaultPageSize
并将 null
作为参数传递来禁用分页...
创建 TABLE 音乐(艺术家文本、专辑文本、tr_num int、歌曲文本、PRIMARY KEY((艺术家)、专辑、tr_num)),聚类顺序为(专辑 DESC ,tr_num DESC);
我无法使用 datastax PHP 驱动程序获得以下查询的结果,
select * from track where id='35209' and day in (20180314,20180315,20180316) and datetime < '2018-03-15 11:00:00' order by datetime desc limit 1;
error message : "Cannot page queries with both ORDER BY and a IN restriction on the partition key; you must either remove the ORDER BY or the IN and sort client side, or disable paging for this query"
那么 "executeAsync" 如何禁用分页?
您可以通过对 Cluster.Builder
对象调用 withDefaultPageSize
并将 null
作为参数传递来禁用分页...
创建 TABLE 音乐(艺术家文本、专辑文本、tr_num int、歌曲文本、PRIMARY KEY((艺术家)、专辑、tr_num)),聚类顺序为(专辑 DESC ,tr_num DESC);