replace value vs. insert node

Friday, 22 March 2013 · 2 messages · last reply 24 Mar 2013
CM
Cerstin Elisabeth Mahlow22 Mar 2013 20:26 #
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 at unibas.ch Web: http://www.oldphras.net
CG
Christian Grün24 Mar 2013 19:46 #
Hi Cerstin, a short one: value updates are indeed cheaper than structural updates (deletes and inserts). Cheers, Christian
Quoted text · Cerstin Elisabeth Mahlow · 37 lines
On Fri, Mar 22, 2013 at 8:26 PM, Cerstin Elisabeth Mahlow <cerstin.mahlow at 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 at unibas.ch > Web: http://www.oldphras.net > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

⚡Generated with XQuery