[ 
https://issues.apache.org/jira/browse/COUCHDB-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13704323#comment-13704323
 ] 

Gary Titus commented on COUCHDB-1851:
-------------------------------------

On my problem - The original document is very large and as I stated I break it 
down into constituent parts and then the views are run only for the constituent 
parts but because the view function loads every document it fails or slows 
down. Due to regulatory requirements i have to store the original document 
before breakdown.

I am +1 on the "chained views" feature cause in that case I can send only one 
doc._id and for others then can send multiple doc ids.
                
> View binding to a document
> --------------------------
>
>                 Key: COUCHDB-1851
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1851
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core, JavaScript View Server
>            Reporter: Gary Titus
>
> Would like to request for a feature of creating a design document to be 
> associated with only one document.
> Currently the view function function(doc) it iterates over all documents in 
> the database and one is required to check for either _id or create a type and 
> check for it in the view.
> In my use of couchdb i have lot of documents with large size and so running 
> of a view takes one and in some case couch crashes with following
> [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.24612.16>] {error_report,<0.34.0>,
>                         {<0.24612.16>,crash_report,
>                          [[{initial_call,
>                             {couch_view_group,init,['Argument__1']}},
>                            {pid,<0.24612.16>},
>                            {registered_name,[]},
>                            {error_info,
>                             {exit,
>                              {os_process_error,{exit_status,0}},
>                              [{gen_server,terminate,6,
>                                [{file,"gen_server.erl"},{line,737}]},
>                               {proc_lib,init_p_do_apply,3,
>                                [{file,"proc_lib.erl"},{line,227}]}]}},
>                            {ancestors,[<0.24611.16>]},
>                            {messages,[]},
>                            {links,[<0.24613.16>,<0.101.0>]},
>                            {dictionary,[]},
>                            {trap_exit,true},
>                            {status,running},
>                            {heap_size,1597},
>                            {stack_size,24},
>                            {reductions,438}],
>                           []]}}
> [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.24613.16>] ** Generic server 
> <0.24613.16> terminating 
> ** Last message in was {'EXIT',<0.24612.16>,
>                                {os_process_error,{exit_status,0}}}
> ** When Server state == {file,{file_descriptor,prim_file,{#Port<0.5462>,512}},
>                               4192}
> ** Reason for termination == 
> ** {os_process_error,{exit_status,0}}
> [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.24613.16>] {error_report,<0.34.0>,
>                         {<0.24613.16>,crash_report,
>                          [[{initial_call,{couch_file,init,['Argument__1']}},
>                            {pid,<0.24613.16>},
>                            {registered_name,[]},
>                            {error_info,
>                             {exit,
>                              {os_process_error,{exit_status,0}},
>                              [{gen_server,terminate,6,
>                                [{file,"gen_server.erl"},{line,737}]},
>                               {proc_lib,init_p_do_apply,3,
>                                [{file,"proc_lib.erl"},{line,227}]}]}},
>                            {ancestors,[<0.24612.16>,<0.24611.16>]},
>                            {messages,[{'EXIT',<0.24615.16>,shutdown}]},
>                            {links,[]},
>                            {dictionary,[]},
>                            {trap_exit,true},
>                            {status,running},
>                            {heap_size,610},
>                            {stack_size,24},
>                            {reductions,1093}],
>                           []]}}
> [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.29460.2>] Uncaught server error: 
> {os_process_error,
>                                               {exit_status,0}}
> Now i agree that my document may be too big, and i know which one cause the 
> problem it would of immense help if instead of going through each document in 
> the view function i can pass the doc._id to the view function or the view is 
> associated somehow with a document and runs for only that document.
> That will solve one of my issues in terms of view performance and memory 
> requirements in the case that is a large document but i have no view 
> associated with it and i have smaller docs that contain extracted content of 
> the large doc on which i want to run views then if the view is associated 
> with a document it will never load the large document.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to