Raphael Augusto da Silva Nunes Soransso created COUCHDB-3215:
----------------------------------------------------------------

             Summary: Differet size for the same view
                 Key: COUCHDB-3215
                 URL: https://issues.apache.org/jira/browse/COUCHDB-3215
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core, JavaScript View Server
            Reporter: Raphael Augusto da Silva Nunes Soransso


Hi, I have created two structure for a set of data to analyse if it would make 
the queries faster, one data was created using a different table, from 
relational database, as the root of the documents:
Example:
One struture is like this:
{
   "c_customer_sk": 65836,
   "c_first_name": "Frank",
   "c_last_name": "White",
   "store_sales": [       {
           "ss_sales_price": 20.24,
           "ss_ext_sales_price": 1012,
           "ss_coupon_amt": 0,
           "date": [               {
                   "d_month_seq": 1187,
                   "d_year": 1998               }           ],
           "item": [               {
                   "i_item_sk": 10454,
                   "i_item_id": "AAAAAAAAGNICAAAA",
                   "i_item_desc": "Results highlight as patterns; so right 
years show. Sometimes suitable lips move with the critics. English, old mothers 
ought to lift now perhaps future managers. Active, single ch",
                   "i_current_price": 2.88,
                   "i_class": "romance",
                   "i_category_id": 9,
                   "i_category": "Books"               }           ]       },
       {
            "ss_sales_price": 225,
           "ss_ext_sales_price": 1023,
           "ss_coupon_amt": 0,... 

The other organization for the same data is:
{
  "i_item_sk": 10454,
  "i_item_id": "AAAAAAAAGNICAAAA",
  "i_item_desc": "Results highlight as patterns; so right years show. Sometimes 
suitable lips move with the critics. English, old mothers ought to lift now 
perhaps future managers. Active, single ch",
  "i_current_price": 2.88,
  "i_class": "romance",
  "i_category_id": 9,
  "i_category": "Books",
   "store_sales": [
       {
           "ss_sales_price": 20.24,
           "ss_ext_sales_price": 1012,
           "ss_coupon_amt": 0,
           "date": [
               {
                   "d_month_seq": 1187,
                   "d_year": 1998
               }
           ],
           "customer": [
               { 
                   "c_customer_sk": 65836,
                   "c_first_name": "Frank",
                   "c_last_name": "White",
               }
           ]
       },
       {
            "ss_sales_price": 225,
           "ss_ext_sales_price": 1023,
           "ss_coupon_amt": 0,...  

If I create the same view for both data, their data_sizes are different, can 
someone explain me why?
I have posted it on stackoverflow too: 
http://stackoverflow.com/questions/38509074/different-size-for-the-same-view-on-couchdb/38521448#38521448



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to