Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15416/compiler/algebra/prop
Modified Files:
Tag: Aug2009_NFI
prop_card.c prop_composite_key.c prop_const.c prop_dom.c
prop_fd.c prop_guide.c prop_icol.c prop_key.c prop_level.c
prop_lineage.c prop_ocol.c prop_ori_names.c prop_rec_delta.c
prop_req_node.c prop_reqval.c prop_set.c prop_trace_names.c
prop_unq_names.c
Log Message:
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
U prop_unq_names.c
Index: prop_unq_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_unq_names.c,v
retrieving revision 1.44
retrieving revision 1.44.6.1
diff -u -d -r1.44 -r1.44.6.1
--- prop_unq_names.c 12 Jun 2009 13:06:14 -0000 1.44
+++ prop_unq_names.c 28 Sep 2009 23:20:25 -0000 1.44.6.1
@@ -552,6 +552,7 @@
break;
case la_error:
+ case la_cache:
bulk_add_name_pairs (np_list, R(n));
break;
U prop_ocol.c
Index: prop_ocol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_ocol.c,v
retrieving revision 1.75
retrieving revision 1.75.6.1
diff -u -d -r1.75 -r1.75.6.1
--- prop_ocol.c 12 Jun 2009 13:06:14 -0000 1.75
+++ prop_ocol.c 28 Sep 2009 23:20:25 -0000 1.75.6.1
@@ -1019,6 +1019,7 @@
break;
case la_error:
+ case la_cache:
ocols (n) = copy_ocols (ocols (R(n)), ocols_count (R(n)));
break;
U prop_const.c
Index: prop_const.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_const.c,v
retrieving revision 1.53
retrieving revision 1.53.6.1
diff -u -d -r1.53 -r1.53.6.1
--- prop_const.c 12 Jun 2009 13:06:13 -0000 1.53
+++ prop_const.c 28 Sep 2009 23:20:25 -0000 1.53.6.1
@@ -709,6 +709,7 @@
case la_error:
case la_nil:
+ case la_cache:
case la_trace:
case la_trace_items:
case la_trace_msg:
@@ -747,7 +748,8 @@
n->sem.fun_call.kind == alg_fun_call_pf_collections_unsafe ||
n->sem.fun_call.kind == alg_fun_call_xrpc ||
n->sem.fun_call.kind == alg_fun_call_xrpc_helpers ||
- n->sem.fun_call.kind == alg_fun_call_tijah) &&
+ n->sem.fun_call.kind == alg_fun_call_tijah ||
+ n->sem.fun_call.kind == alg_fun_call_cache) &&
PFprop_const (L(n)->prop, n->sem.fun_call.iter))
PFprop_mark_const (
n->prop,
U prop_reqval.c
Index: prop_reqval.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_reqval.c,v
retrieving revision 1.57
retrieving revision 1.57.6.1
diff -u -d -r1.57 -r1.57.6.1
--- prop_reqval.c 12 Jun 2009 13:06:14 -0000 1.57
+++ prop_reqval.c 28 Sep 2009 23:20:25 -0000 1.57.6.1
@@ -1052,6 +1052,16 @@
prop_infer_reqvals (R(n), rmap);
} return; /* only infer once */
+ case la_cache:
+ {
+ PFarray_t *rmap = PFarray (sizeof (req_val_t), 2);
+ adjust_order_ (rmap, n->sem.cache.pos);
+ adjust_value_ (rmap, n->sem.cache.item);
+
+ prop_infer_reqvals_empty (L(n)); /* side effects */
+ prop_infer_reqvals (R(n), rmap);
+ } return; /* only infer once */
+
case la_trace:
prop_infer_reqvals_empty (L(n)); /* side effects */
prop_infer_reqvals_empty (R(n)); /* traces */
U prop_set.c
Index: prop_set.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_set.c,v
retrieving revision 1.34
retrieving revision 1.34.6.1
diff -u -d -r1.34 -r1.34.6.1
--- prop_set.c 29 Jul 2009 09:10:52 -0000 1.34
+++ prop_set.c 28 Sep 2009 23:20:25 -0000 1.34.6.1
@@ -90,6 +90,7 @@
case la_serialize_seq:
case la_serialize_rel:
case la_side_effects:
+ case la_cache:
case la_trace:
case la_trace_items:
case la_trace_msg:
@@ -340,6 +341,7 @@
case la_frag_union:
case la_empty_frag:
case la_nil:
+ case la_cache:
case la_trace:
case la_trace_items:
case la_trace_msg:
U prop_icol.c
Index: prop_icol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_icol.c,v
retrieving revision 1.49
retrieving revision 1.49.6.1
diff -u -d -r1.49 -r1.49.6.1
--- prop_icol.c 12 Jun 2009 13:06:13 -0000 1.49
+++ prop_icol.c 28 Sep 2009 23:20:25 -0000 1.49.6.1
@@ -727,6 +727,14 @@
case la_nil:
break;
+ case la_cache:
+ /* infer empty list for other side effects */
+ n->prop->l_icols = NULL;
+ /* infer columns that are needed for caching */
+ union_ (n->prop->r_icols, n->sem.cache.pos);
+ union_ (n->prop->r_icols, n->sem.cache.item);
+ break;
+
case la_trace:
/* infer empty list for other side effects */
n->prop->l_icols = NULL;
U prop_rec_delta.c
Index: prop_rec_delta.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_rec_delta.c,v
retrieving revision 1.34
retrieving revision 1.34.6.1
diff -u -d -r1.34 -r1.34.6.1
--- prop_rec_delta.c 12 Jun 2009 13:06:14 -0000 1.34
+++ prop_rec_delta.c 28 Sep 2009 23:20:25 -0000 1.34.6.1
@@ -97,6 +97,7 @@
case la_empty_frag:
case la_fun_frag_param:
case la_error:
+ case la_cache:
/* do not propagate or introduce any column information */
break;
U prop_level.c
Index: prop_level.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_level.c,v
retrieving revision 1.24
retrieving revision 1.24.6.1
diff -u -d -r1.24 -r1.24.6.1
--- prop_level.c 12 Jun 2009 13:06:14 -0000 1.24
+++ prop_level.c 28 Sep 2009 23:20:25 -0000 1.24.6.1
@@ -143,6 +143,7 @@
case la_doc_index_join:
case la_doc_access:
case la_error:
+ case la_cache:
/* level stays the same */
copy_level_info (n, R(n));
break;
U prop_composite_key.c
Index: prop_composite_key.c
===================================================================
RCS file:
/cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_composite_key.c,v
retrieving revision 1.33
retrieving revision 1.33.6.1
diff -u -d -r1.33 -r1.33.6.1
--- prop_composite_key.c 12 Jun 2009 13:06:13 -0000 1.33
+++ prop_composite_key.c 28 Sep 2009 23:20:25 -0000 1.33.6.1
@@ -828,6 +828,7 @@
break;
case la_error:
+ case la_cache:
copy (CKEYS, RCKEYS);
break;
U prop_fd.c
Index: prop_fd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_fd.c,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -u -d -r1.8 -r1.8.6.1
--- prop_fd.c 12 Jun 2009 13:06:13 -0000 1.8
+++ prop_fd.c 28 Sep 2009 23:20:25 -0000 1.8.6.1
@@ -157,6 +157,7 @@
case la_empty_frag:
case la_error:
case la_nil:
+ case la_cache:
case la_trace:
case la_rec_fix:
case la_rec_param:
U prop_trace_names.c
Index: prop_trace_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_trace_names.c,v
retrieving revision 1.34
retrieving revision 1.34.6.1
diff -u -d -r1.34 -r1.34.6.1
--- prop_trace_names.c 12 Jun 2009 13:06:14 -0000 1.34
+++ prop_trace_names.c 28 Sep 2009 23:20:25 -0000 1.34.6.1
@@ -134,6 +134,7 @@
case la_type_assert:
case la_roots:
case la_error:
+ case la_cache:
case la_trace:
case la_trace_items:
case la_trace_msg:
U prop_key.c
Index: prop_key.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_key.c,v
retrieving revision 1.65
retrieving revision 1.65.6.1
diff -u -d -r1.65 -r1.65.6.1
--- prop_key.c 12 Jun 2009 13:06:13 -0000 1.65
+++ prop_key.c 28 Sep 2009 23:20:25 -0000 1.65.6.1
@@ -747,6 +747,7 @@
break;
case la_error:
+ case la_cache:
copy (n->prop->keys, R(n)->prop->keys);
break;
U prop_req_node.c
Index: prop_req_node.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_req_node.c,v
retrieving revision 1.19
retrieving revision 1.19.6.1
diff -u -d -r1.19 -r1.19.6.1
--- prop_req_node.c 12 Jun 2009 13:06:14 -0000 1.19
+++ prop_req_node.c 28 Sep 2009 23:20:25 -0000 1.19.6.1
@@ -891,6 +891,19 @@
prop_infer_req_node_vals (R(n), NULL); /* trace */
return; /* only infer once */
+ case la_cache:
+ if (type_of (n, n->sem.cache.pos) & aat_node)
+ add_order_map (n, n->sem.cache.pos);
+ if (type_of (n, n->sem.cache.item) & aat_node)
+ add_map_ (n, n->sem.cache.item,
+ true, true, true,
+ true, true, true,
+ true, true, true);
+
+ prop_infer_req_node_vals (L(n), NULL); /* side effects */
+ prop_infer_req_node_vals (R(n), MAP_LIST(n));
+ return; /* only infer once */
+
case la_trace_items:
assert ((type_of (n, n->sem.iter_pos_item.iter) & aat_node) == 0);
if (type_of (n, n->sem.iter_pos_item.item) & aat_node)
U prop_guide.c
Index: prop_guide.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_guide.c,v
retrieving revision 1.35
retrieving revision 1.35.6.1
diff -u -d -r1.35 -r1.35.6.1
--- prop_guide.c 12 Jun 2009 13:06:13 -0000 1.35
+++ prop_guide.c 28 Sep 2009 23:20:25 -0000 1.35.6.1
@@ -842,6 +842,7 @@
case la_empty_frag:
case la_error:
case la_nil:
+ case la_cache:
case la_trace:
case la_trace_items:
case la_trace_msg:
U prop_ori_names.c
Index: prop_ori_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_ori_names.c,v
retrieving revision 1.42
retrieving revision 1.42.6.1
diff -u -d -r1.42 -r1.42.6.1
--- prop_ori_names.c 12 Jun 2009 13:06:14 -0000 1.42
+++ prop_ori_names.c 28 Sep 2009 23:20:25 -0000 1.42.6.1
@@ -564,6 +564,7 @@
break;
case la_error:
+ case la_cache:
/* do not infer name pairs to the other sie effects */
n->prop->r_name_pairs = PFarray_copy (np_list);
break;
U prop_card.c
Index: prop_card.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_card.c,v
retrieving revision 1.43
retrieving revision 1.43.6.1
diff -u -d -r1.43 -r1.43.6.1
--- prop_card.c 12 Jun 2009 13:06:12 -0000 1.43
+++ prop_card.c 28 Sep 2009 23:20:25 -0000 1.43.6.1
@@ -184,6 +184,7 @@
case la_error:
case la_nil:
+ case la_cache:
case la_trace:
case la_trace_items:
case la_trace_msg:
U prop_lineage.c
Index: prop_lineage.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_lineage.c,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -u -d -r1.8 -r1.8.6.1
--- prop_lineage.c 12 Jun 2009 13:06:14 -0000 1.8
+++ prop_lineage.c 28 Sep 2009 23:20:25 -0000 1.8.6.1
@@ -124,6 +124,7 @@
case la_serialize_rel:
case la_content:
case la_error:
+ case la_cache:
add_all (R(n));
break;
U prop_dom.c
Index: prop_dom.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_dom.c,v
retrieving revision 1.68
retrieving revision 1.68.6.1
diff -u -d -r1.68 -r1.68.6.1
--- prop_dom.c 12 Jun 2009 13:06:13 -0000 1.68
+++ prop_dom.c 28 Sep 2009 23:20:25 -0000 1.68.6.1
@@ -1151,6 +1151,7 @@
break;
case la_error:
+ case la_cache:
bulk_add_dom (R(n));
break;
------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins