Hi Horn,
Sedna implements two-phase locking (see here for simple description
http://en.wikipedia.org/wiki/Two-phase_locking). So, if you read a
document/collection it can't be changed simultaneously.
Collections/documents are locked as a whole, there is no locks like "lock
product X or manufacturer Y". There are locks like "put shared lock on
document (collection) X" - in this case other users will be able to read but
not changes document (collection) X.
I think, it's better to use different documents in your case.
To increase performance, consider using the following:
1. *Value indices*: to increase speed of lookups - like get product with ID
X, or manufacturer with ID Y. Note, create indices after bulk load.
2. *Unordered declaration: *use "declare ordering unordered;" prolog
declaration in any query where ordering of result doesn't matter for you:
http://www.w3.org/TR/xquery/#id-default-ordering-decl .
3. *Buffers size: *increase SM's buffers if you see high IO values in the
event log (records like: INFO 16/02/2011 00:03:49 (SM y pid=1896)
[bm_core.cpp:bm_log_out_io_statistics:521]: IO block *reads:123456*,
writes:12).
4. *Read-only transactions: *READ-ONLY transactions have one major
benefit: they never wait for other transactions (they do not have to acquire
any document/collection locks). However they might access slightly obsolete
state of the database (for example, they probably would not see the most
recent committed updates). You should use READ-ONLY transactions in a
highly concurrent environment.
5. *Full-text indices: *to increase speed of queries like "get product with
name contains X" and other text processing queries.
Let us know if you have performance problems or any questions.
Ivan Shcheklein,
Sedna Team
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion