A mango index is, basically, a more or less standard view, defined using
special syntax. Mango index rules live in design docs and can be created
not only using POST db/_index endpoint, but also saving a syntactically
valid ddoc directly. Unlike most views, indices emit only keys, no values –
so doc parts are included into keys.

Since indices are views, they behave as views, at least as I observed
(never dug into Mango code). So unless you fetch an index using direct
/_view or indirect /_find, no indexing occurs. So – no background indexers
and no index update on upsert.

ermouth


пн, 23 сент. 2019 г. в 09:55, Jose Juan Montiel <[email protected]
>:

>  hi ermouth,
>
> i think it's clear enough, last questions, 1º simple index work in the same
> way (in order to trigger the work) i.e. it's the call to the query that
> match the index (in the case of partial index the query that use the index)
> the trigger that update the index with the latest updates? Or in this case
> there is something in background? 2º reggarding to this, in case of create
> index with a created database, when does trigger the indexing job, in any
> insert o call to database?
>
> Could i try to find a good place in doc (if not there yet) to accommodate
> this Q&A and made a PR? I would like to contribute.
>
> Thanks a lot.
>
>
> El lun., 23 sept. 2019 a las 1:16, ermouth (<[email protected]>) escribió:
>
> > No penalty until first request to a view.
> >
> > When a view is accessed, all documents updated since last request to the
> > view are processed by the view code. More precisely, all views from the
> > parent design document are applied to each updated doc, and their results
> > are persisted.
> >
> > So unless you use at least one of a design doc views at least once, the
> > design doc‘s view cost is ~zero.
> >
> > However, first accessing a view in a DB with a lot of docs may seriously
> > impact performance.
> >
> > ermouth
> >
> >
> > пн, 23 сент. 2019 г. в 01:30, Jose Juan Montiel <
> > [email protected]
> > >:
> >
> > > Hi,
> > >
> > > the extended/explained title is: how much cost/increase views (in terms
> > of
> > > cpu, memory, storage) over only index, in the life of
> > database/application.
> > >
> > > I know there are different things, for different targets, but i would
> > like
> > > to know how many things need to do the database, to keep its update
> with
> > > new inserts.
> > >
> > > Some people propose in https://jira.hyperledger.org/browse/FAB-5528 to
> > > include views in the smartcontract, but the mantainers decide to
> dismiss.
> > > Now is possible create index, to accelerate the queries, but not
> possible
> > > to aggregate info directly with view queries.
> > >
> > > The question its to know how much performance cold the blockchain loose
> > if
> > > views are created in couchdb.
> > >
> > > Thanks for all.
> > >
> > > --
> > > This is your badness level.
> > > It's unusually high for someone your size.
> > > We have to fix that.
> > >
> >
>
>
> --
> This is your badness level.
> It's unusually high for someone your size.
> We have to fix that.
>

Reply via email to