Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-49860

CBO: UPDATE STATISTICS only collect histograms on first 10 terms

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Neo
    • Neo
    • query
    • Untriaged
    • 1
    • Unknown

    Description

      update statistics for KS1(uniq_i, rand_i, norm_i, zipf_i, u016_i, u256_i, u04k_i, u64k_i, DISTINCT uarr_i, ALL uarr_i, DISTINCT earr_i, ALL earr_i, DISTINCT zarr_i, ALL zarr_i);

      Only the first 10 column statistics were updated.

      select * from system:dictionary where `bucket` = "KS1"; This only shows stats for the first 10 columns.

      Attachments

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

        Activity

          Build couchbase-server-7.1.0-1822 contains query-ee commit eedbcdd with commit message:
          MB-49860 Need to reset document retriever if multiple passes needed for UPDATE STATISTICS

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1822 contains query-ee commit eedbcdd with commit message: MB-49860 Need to reset document retriever if multiple passes needed for UPDATE STATISTICS
          bingjie.miao Bingjie Miao added a comment -

          To verify:

          start fresh with new travel-sample
          do an UPDATE STATISTICS on one of the travel-sample collections and include > 10 terms in the list of terms, then do
          select * from system:dictionary where `bucket` = "travel-sample" and `collection` = <collection_name>;
          look at the distributionKeys array, and see whether all terms (should be > 10) are listed there.

          bingjie.miao Bingjie Miao added a comment - To verify: start fresh with new travel-sample do an UPDATE STATISTICS on one of the travel-sample collections and include > 10 terms in the list of terms, then do select * from system:dictionary where `bucket` = "travel-sample" and `collection` = <collection_name>; look at the distributionKeys array, and see whether all terms (should be > 10) are listed there.

          Verified on 7.1.0-1913

          cbq> update statistics for `travel-sample`.inventory.hotel(title, name, address, directions, phone, tollfree, email, fax, url, checkin, checkout, price, geo.lat, geo.lon, geo.accuracy);
          {
              "requestID": "d7ff6277-1bc1-462e-b25b-0bedbaac0243",
              "signature": null,
              "results": [
              ],
              "status": "success",
              "metrics": {
                  "elapsedTime": "8.417549389s",
                  "executionTime": "8.41732068s",
                  "resultCount": 0,
                  "resultSize": 0,
                  "serviceLoad": 6
              }
          }
           
          cbq> select distributionKeys from system:dictionary where `bucket` = 'travel-sample' and `keyspace` = 'hotel';
          {
              "requestID": "5b20af9f-0a84-4f96-8553-762c49a9575f",
              "signature": {
                  "distributionKeys": "json"
              },
              "results": [
              {
                  "distributionKeys": [
                      "url",
                      "(geo.accuracy)",
                      "address",
                      "name",
                      "(geo.lon)",
                      "directions",
                      "tollfree",
                      "(geo.lat)",
                      "fax",
                      "title",
                      "phone",
                      "price",
                      "checkin",
                      "checkout",
                      "email"
                  ]
              }
              ],
              "status": "success",
              "metrics": {
                  "elapsedTime": "22.009692ms",
                  "executionTime": "21.856767ms",
                  "resultCount": 1,
                  "resultSize": 388,
                  "serviceLoad": 6
              }
          }
           

          pierre.regazzoni Pierre Regazzoni added a comment - Verified on 7.1.0-1913 cbq> update statistics for `travel-sample`.inventory.hotel(title, name, address, directions, phone, tollfree, email, fax, url, checkin, checkout, price, geo.lat, geo.lon, geo.accuracy); {     "requestID" : "d7ff6277-1bc1-462e-b25b-0bedbaac0243" ,     "signature" : null ,     "results" : [     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "8.417549389s" ,         "executionTime" : "8.41732068s" ,         "resultCount" : 0 ,         "resultSize" : 0 ,         "serviceLoad" : 6     } }   cbq> select distributionKeys from system:dictionary where `bucket` = 'travel-sample' and `keyspace` = 'hotel' ; {     "requestID" : "5b20af9f-0a84-4f96-8553-762c49a9575f" ,     "signature" : {         "distributionKeys" : "json"     },     "results" : [     {         "distributionKeys" : [             "url" ,             "(geo.accuracy)" ,             "address" ,             "name" ,             "(geo.lon)" ,             "directions" ,             "tollfree" ,             "(geo.lat)" ,             "fax" ,             "title" ,             "phone" ,             "price" ,             "checkin" ,             "checkout" ,             "email"         ]     }     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "22.009692ms" ,         "executionTime" : "21.856767ms" ,         "resultCount" : 1 ,         "resultSize" : 388 ,         "serviceLoad" : 6     } }

          People

            pierre.regazzoni Pierre Regazzoni
            murali.krishna Murali Krishna
            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