Cassandra
  1. Cassandra
  2. CASSANDRA-571

API for requesting sub-slices of a range of supercolumns

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      Suhail Doshi wrote in a comment to CASSANDRA-570 (a different issue):

      Ability to slice a column and specify an exact super column key, for example:

      column_1 {
      sc1: {}
      }

      column_2 {
      sc1: {}
      sc2: {}
      }

      Be able to slice by "column_1" to "column_2" but instead of grabbing every column, grab only super column "sc1" from each? The reasoning is that it's terrible to have to slice by column and get every super column and have it held in memory for the client application.

        Activity

        Hide
        James Churchman added a comment -

        defiantly, it's equivalent to doing a "select * " in sql at the moment and thats always bad - it needs a "sub slice predicate" or similar

        Show
        James Churchman added a comment - defiantly, it's equivalent to doing a "select * " in sql at the moment and thats always bad - it needs a "sub slice predicate" or similar
        Hide
        Jonathan Ellis added a comment -

        As we've figured out best practices around supercolumns, this isn't really necessary. (Supercolumns are best used for denormalizing data that is accessed at the same time.)

        Show
        Jonathan Ellis added a comment - As we've figured out best practices around supercolumns, this isn't really necessary. (Supercolumns are best used for denormalizing data that is accessed at the same time.)
        Hide
        Caleb William Rackliffe added a comment - - edited

        Cassandra seems like it performs well as a time-series database, but it could also be used as a "bi-temporal" time-series database if this feature were implemented.

        For instance, let's say I want to store time-series data corresponding to major macro-economic measures like GDP, PPI, and CPI. These measures are frequently revised months after they are first published, so I may want to know what they looked like "as of" a specific date. A more concrete example might be that I want to know the past year of monthly CPI (consumer price index) numbers "as of" May 31st. If the data point for May 1st is revised on June 1st, I can query CPI as of June 2nd and get a different series.

        If I store the data along the axis of "as of" dates, I may have to replicate a great deal of data across columns. If I decide to give every series its own CF, that may be unwieldy, but at least I could make my keys "observation dates" and my CF columns "as of" dates.

        Am I just overlooking some other way to model the data to make these sorts of queries reasonable?

        Show
        Caleb William Rackliffe added a comment - - edited Cassandra seems like it performs well as a time-series database, but it could also be used as a "bi-temporal" time-series database if this feature were implemented. For instance, let's say I want to store time-series data corresponding to major macro-economic measures like GDP, PPI, and CPI. These measures are frequently revised months after they are first published, so I may want to know what they looked like "as of" a specific date. A more concrete example might be that I want to know the past year of monthly CPI (consumer price index) numbers "as of" May 31st. If the data point for May 1st is revised on June 1st, I can query CPI as of June 2nd and get a different series. If I store the data along the axis of "as of" dates, I may have to replicate a great deal of data across columns. If I decide to give every series its own CF, that may be unwieldy, but at least I could make my keys "observation dates" and my CF columns "as of" dates. Am I just overlooking some other way to model the data to make these sorts of queries reasonable?

          People

          • Assignee:
            Unassigned
            Reporter:
            Jonathan Ellis
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development