couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Introduction to CouchDB views" by ChrisAnderson
Date Sun, 04 Jan 2009 01:12:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by ChrisAnderson:
http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views

The comment on the change is:
change temp_view to slow_view

------------------------------------------------------------------------------
  
  '''Permanent views''' are stored inside special documents called design documents, and can
be accessed via an HTTP ''GET'' request to the URI ''/{dbname}/{docid}/{viewname}'', where
''{docid}'' has the prefix ''_view/'' so that CouchDB recognizes the document as a design
document.
  
- '''Temporary views''' are not stored in the database, but rather executed on demand. To
execute a temporary view, you make an HTTP ''POST'' request to the URI ''/{dbname}/_temp_view'',
where the body of the request contains the code of the view function and the ''Content-Type''
header is set to ''application/json''.
+ '''Temporary views''' are not stored in the database, but rather executed on demand. To
execute a temporary view, you make an HTTP ''POST'' request to the URI ''/{dbname}/_slow_view'',
where the body of the request contains the code of the view function and the ''Content-Type''
header is set to ''application/json''.
  
  '''NOTE''': Temporary views are only good during development. Final code should not rely
on them as they are very expensive to compute each time they get called and they get increasingly
slower the more data you have in a database. If you think you can't solve something in a permanent
view that you can solve in an ad-hoc view, you might want to reconsider. (TODO: add typical
examples and solutions).
  

Mime
View raw message