On Thu, May 7, 2015 at 7:21 PM, Tyler Hobbs <ty...@datastax.com> wrote:

> There are general plans to increase the types of filtering that Cassandra
> can do server-side, but CASSANDRA-8099 is necessary for a lot of that work.
>
> We prefer not to support things in cqlsh that can't be done through normal
> cql queries (outside of basic admin-type operations).  What sort of API are
> you envisioning?
>

My only requirement is, given a primary key restriction, to be able to
filter (in WHERE clause, or similar) based on other things than clustering
key and secondary index.

It's also worth pointing out that making this kind of filtering performant
is _not_ a requirement (okay, using Spark below is too slow ;)). What I am
asking for here is a tooling feature, not something I would use for
production loads. Personally, I like how CQL is somewhat locked down for
usage patterns that performs well (that is only filtering based on
indexes). That's the reason why I proposed this sort of thing to be added
to cqlsh.

My specific use case is that we have a couple of tables with ~500-5000
(CQL) rows per partition id (=userid) and occasionally need to
interactively look at a subset of those when debugging and whatnot. Our
current workarounds consists of:

   - Using Spark: Ridiculous overhead for this sort of thing.
   - Selecting all rows in cqlsh and using in-terminal search functionality
   to try to find the row. Cumbersome and error prone.
   - Write a small application that fetches all rows for a partition key
   and filters the relevalt row(s) client-side. Takes time and feels
   ridiculous for a single primary key.
   - Adding a secondary index: Huge overhead for smaller tasks like this.
   AFAIK, there are also other performance related issues with secondary
   indexes.

Let me know what you think. Also, let me know if you would like me to
create a JIRA ticket and continue the discussion there.

Cheers,
Jens

-- 
Jens Rantil
Backend engineer
Tink AB

Email: jens.ran...@tink.se
Phone: +46 708 84 18 32
Web: www.tink.se

Facebook <https://www.facebook.com/#!/tink.se> Linkedin
<http://www.linkedin.com/company/2735919?trk=vsrp_companies_res_photo&trkInfo=VSRPsearchId%3A1057023381369207406670%2CVSRPtargetId%3A2735919%2CVSRPcmpt%3Aprimary>
 Twitter <https://twitter.com/tink>

Reply via email to