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

Specialize MultiCBuilder when building a single clustering

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.2
    • None

    Description

      MultiCBuilder is used to build the Clustering and Slice.Bound used by queries. As the name implies, it's able to build multiple Clustering/Slice.Bound for when we have IN, but most queries don't use IN and in this (frequent) case, MultiCBuilder creates quite a bit more objects that would be necessary (it creates 2 lists for its elementsList, then a CBuilder and a BTreeSet.Builder (even though we know the resulting set will have only one element in this case)). Without being huge, this does show up as non entirely negligible when profiling some simple stress.

      We can easily know if the query has a IN and so we can know when only a single Clustering/Slice.Bound is built, and we can specialize the implementation in that case to be less wasteful.

      Attachments

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Benjamin Lerer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: