The limit only bounds what you return not what you scan On Oct 3, 2022, at 10:56 AM, Regis Le Bretonnic wrote:Hi...We do the same (even if a lot of people will say it's bad and that you shouldn't...) with a "allow filtering" BUT ALWAYS WITHIN A PARTITION AND WITH A LIMIT CLAUSE TO AVOID A FULL
How many rows you are expecting within your partition?
On Mon, 3 Oct, 2022, 21:56 Karthik K, wrote:
> We have a table designed to retrieve products by name in ascending order.
> OrganisationID and ProductType will be the compound partition key, whereas
> the ProductName will be the clustering
Hi...
We do the same (even if a lot of people will say it's bad and that you
shouldn't...) with a "allow filtering" BUT ALWAYS WITHIN A PARTITION AND
WITH A LIMIT CLAUSE TO AVOID A FULL PARTITION SCAN.
.
So you need to know the organisation_id and the product_type...
and paginate your result
We have a table designed to retrieve products by name in ascending order.
OrganisationID and ProductType will be the compound partition key, whereas
the ProductName will be the clustering key. So, the primary key structure
is ((organisation_id, product_type), product_name) with clustering order