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

functional indexes

    XMLWordPrintableJSON

Details

    Description

      Indexing information derived from the row can be powerful. For example, using the hypothetical extract_date function,

      create table ticks (
          symbol text,
          ticked_at datetime,
          price int,
          tags set<text>,
          PRIMARY KEY (symbol, ticked_at)
      );
      
      CREATE INDEX ticks_by_day ON ticks(extract_date(ticked_at));
      
      SELECT * FROM ticks_by_day WHERE extract_date(ticked_at) = '2014-5-13';
      

      http://www.postgresql.org/docs/9.3/static/indexes-expressional.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbellis Jonathan Ellis
              Shawn Kumar Shawn Kumar
              Votes:
              1 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated: