【发布时间】:2020-12-01 18:58:02
【问题描述】:
我创建了一个类似这样的订单表
create_query1 = CREATE TABLE IF NOT EXISTS orders
(status text, city text, company text, country_id text, created_at timestamp,
customer_address_id text, customer_id text, discount_amount float, discount_invoiced float, email text,
entity_id text, firstname text, free_shipping float, grand_total_final float, is_qty_decimal float,
is_virtual text, item_id text, lastname text, method text, name text, no_discount float,order_id text,
original_price float, parent_id text, postcode text, price float, price_incl_tax float,
product_id text, product_type text, qty_ordered float, qty_shipped float, quote_item_id text,PRIMARY KEY ((order_id), created_at ))
当我查询类似的东西时
SELECT * from orders where created_at >= '2019-01-31 20:55:43' and created_at <= '2019-05-13 13:58:15'
我收到此错误
Error from server: code=2200 [Invalid query] message="Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING"
我在这里做错了什么? Cassandra 不适合这种类型的查询吗?
【问题讨论】:
标签: select cassandra primary-key cql