Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-1333

add documents on creating/using indexes on meta().id

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.6
    • 5.0
    • query
    • None

    Description

      Subject: Re: META().id

      Prasad,

      If you are planning to document, You should also consider Primary Covering Scan.

      https://issues.couchbase.com/browse/MB-19443
      SELECT META().id FROM xxx => use primary index as covering index, skip Fetch.
      DELETE FROM xxx => use primary index as covering index, skip Fetch.
      Regards,
      Sitaram

      From: Cihan Biyikoglu <cihan@couchbase.com>
      Date: Friday, May 6, 2016 at 11:01 AM
      To: Gerald Sangudi <Gerald@couchbase.com>
      Cc: Keshav Murthy <keshav@couchbase.com>, Prasad Varakur <prasad.varakur@couchbase.com>, Sitaram Vemulapalli <sitaram.vemulapalli@couchbase.com>, Prerna Manaktala <Prerna.Manaktala@couchbase.com>
      Subject: RE: META().id

      This is great. Is there an improvement open for this? I missed this but hopefully Prasad caught it and we are documenting all these enhancements.
      Thanks
      -cihan.

      From: Gerald Sangudi
      Sent: Friday, May 6, 2016 9:27 AM
      To: Cihan Biyikoglu <cihan@couchbase.com>
      Cc: Keshav Murthy <keshav@couchbase.com>; Prasad Varakur <prasad.varakur@couchbase.com>; Sitaram Vemulapalli <Sitaram.Vemulapalli@couchbase.com>; Prerna Manaktala <Prerna.Manaktala@couchbase.com>
      Subject: META().id

      Cihan,

      I know you had some personal interest in this:

      On the latest build on master, you can now CREATE INDEX with META() in all the following forms, and they are all equivalent:

      CREATE INDEX idx ON default( META().id );

      CREATE INDEX idx ON default ( META(default).id );

      CREATE INDEX idx ON default ( META(self).id );

      All of these indexes are used equivalently with the appropriate queries.

      Gerald

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          simon.dew Simon Dew added a comment -

          This feature was documented in release/5.0.

          simon.dew Simon Dew added a comment - This feature was documented in release/5.0.

          People

            simon.dew Simon Dew
            Prasad.Varakur Prasad Varakur
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty