Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2829/compiler/semantics
Modified Files:
Tag: Nov2009
xquery_fo.c
Log Message:
propagated changes of Monday Sep 28 2009 - Wednesday Oct 07 2009
from the Aug2009_NFI branch to the Nov2009 branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/28 - boncz: compiler/semantics/xquery_fo.c,1.186.6.1
optimizations for NFI XIRAF use case -- thanks a great bunch Jan R.!!
- ds_link (already in Stable) optimized for 1-node case
- indices now contain all data (but still not used automatically, nor based
on Lefteris' new indexing schemes)
most prominently though is: subexpression result caching
- caching hints in pragmas
- query enclosed in (# pf:session id:msec ) { query } or (# pf:session-use
id:msec ) { query }
+ queries in the same session use the same working set (documents opened
only once)
+ same working set allows to cache results
+ pf:session-use only uses cache, cannot add to it
- but, multiple pf:session-use can run concurrently; whereas pf:session
is exclusive
- inside a query, an arbitrary number of expressions can be marked up for
caching/reuse
+ (# pf:cache id ) { subexpr }
+ subexpr may not be enclosed by a for-loop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/10/06 - boncz: compiler/semantics/xquery_fo.c,1.186.6.2
enable heuristic rewrite value-selections in the algebra backend of
MonetDB/xQuery
has to properly implement pf:attribute(ctx, node, ns1, loc1, ns2, loc2) first,
as only the verion without namespaces was there (that one is now gone).
many restrictions:
- only non-loop-lifted equality tests
- not involving fn:collection or pf:collection (as path reversal in the
latter will never find the supernode)
- not involving any date/time/etc typed expressions (as the indices only work
for string and numerical equality)
went through the testweb and fixed all apparant problems
note the Aug2009_NFI value indices are full; whereas previously they would
omit frequent data items
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U xquery_fo.c
Index: xquery_fo.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v
retrieving revision 1.186
retrieving revision 1.186.4.1
diff -u -d -r1.186 -r1.186.4.1
--- xquery_fo.c 20 Jun 2009 09:36:36 -0000 1.186
+++ xquery_fo.c 7 Oct 2009 13:48:18 -0000 1.186.4.1
@@ -2351,6 +2351,12 @@
.ret_ty = PFty_xs_boolean () } },
.alg = PFbui_op_and_bln }
+ , /* #pf:query-cache (str, item *) as item* */
+ { .ns = PFns_pf, .loc = "query-cache",
+ .arity = 2, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_string (), PFty_star (PFty_item ())
},
+ .ret_ty = PFty_star (PFty_item ()) } },
+ .alg = PFbui_pf_query_cache }
, /* #pf:distinct-doc-order-or-atomic-sequence (item*) as item* */
{ .ns = PFns_pf, .loc = "distinct-doc-order-or-atomic-sequence",
.arity = 1, .sig_count = 1, .sigs = { {
@@ -2551,13 +2557,6 @@
.par_ty = (PFty_t[]) { PFty_star (PFty_xs_anyNode ()) },
.ret_ty = PFty_star (PFty_xs_anyNode ()) } },
.alg = PFbui_pf_fragment }
- , /* pf:attribute (node()*, string) as node()* */
- { .ns = PFns_lib, .loc = "attribute",
- .arity = 2, .sig_count = 1, .sigs = { {
- .par_ty = (PFty_t[]) { PFty_star( PFty_xs_anyNode ()),
- PFty_xs_string () },
- .ret_ty = PFty_star( PFty_xs_anyNode ()) } },
- .alg = PFbui_pf_attribute }
, /* pf:attribute (node()*, string, string, string, string, string) as
node()* */
{ .ns = PFns_lib, .loc = "attribute",
.arity = 6, .sig_count = 1, .sigs = { {
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins