Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15500

Slow query logging emits incomplete predicates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • Observability/Logging
    • None
    • Correctness
    • Normal
    • Normal
    • User Report
    • All
    • None

    Description

      Using Apache Cassandra 3.11.2, defined a table like this:
       
      create table my_table(
                       _                   _partition text,
             _                   _clustering1 int,
                        clustering2 text,
                        data set<text>,
                      *                *primary key (partition, clustering1, clustering2))
       
      and configured slow queries threshold to 1ms in yaml to see how queries passed to cassandra. Query below:
       
      select * from my_table where partition='a' and clustering1= 1 and clustering2='b'
       
      would be like this in debug.log of cassandra:
       
      select * from my_table where partition='a' LIMIT 100>  (it means that the two cluster key restriction did not push down to storage engine and the whole partition been retrieved)
       
      but this query:
       
      select * from my_table where partition='a' and clustering1= 1
       
      would be
       
      select * from my_table where partition='a' and clustering1= 1 LIMIT 100> (single cluster key been pushed down to storage engine)
       
       
      So it seems to me that, we could not restrict multiple clustering keys in select because it would retrieve the whole partition ?!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              onmstester onmstester
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: