Hi Cerstin, a short one: value updates are indeed cheaper than structural updates (deletes and inserts). Cheers, Christian ________________________________ On Fri, Mar 22, 2013 at 8:26 PM, Cerstin Elisabeth Mahlow <cerstin.mahlow@unibas.ch> wrote:
Hi,
in terms of performance, is it cheaper to update the value of an existing node or to insert a node with that value?
I'm not sure if I should create empty nodes or nodes with a default-value in the first place and when users specify values these nodes will be updated. Or if I insert nodes with these values when users specify them in the web interface. Values are short texts like "yes" or "no".
The value of the one node I have to update in any case is a longer text with some markup in it (for highlighting purposes of single tokens).
UPDINDEX for the DB is set and I will have to optimize the index after each user interaction, because I need the fulltext index in the next interaction. So the options are actually these:
- insert 6 nodes, replace value of 1 node, optimize - replace values of 7 nodes, optimize
Thanks in advance and best regards
Cerstin -- Dr. phil. Cerstin Mahlow
Universität Basel Departement Sprach- und Literaturwissenschaften Fachbereich Deutsche Sprach- und Literaturwissenschaft Nadelberg 4 4051 Basel Schweiz
Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mahlow@unibas.ch Web: http://www.oldphras.net
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk