Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2651/compiler/include

Modified Files:
      Tag: Nov2009
        physical.h 
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/include/physical.h,1.56.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/include/physical.h,1.56.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 physical.h
Index: physical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical.h,v
retrieving revision 1.56
retrieving revision 1.56.4.1
diff -u -d -r1.56 -r1.56.4.1
--- physical.h  12 Jun 2009 13:06:16 -0000      1.56
+++ physical.h  7 Oct 2009 13:47:27 -0000       1.56.4.1
@@ -110,8 +110,10 @@
     , pa_content        = 130 /**< constructor content operator (elem|doc) */
     , pa_slim_content   = 131 /**< shallow constructor content operator */
     , pa_merge_adjacent = 132
-    , pa_error          = 139 /**< error operator */
-    , pa_nil            = 140 /**< end of the list of parameters */
+    , pa_error          = 137 /**< error operator */
+    , pa_nil            = 138 /**< end of the list of parameters */
+    , pa_cache          = 139 /**< cache operator */
+    , pa_cache_border   = 140 /**< cache border operator */
     , pa_trace          = 141 /**< debug operator */
     , pa_trace_items    = 142 /**< debug operator */
     , pa_trace_msg      = 143 /**< debug message operator */
@@ -333,6 +335,12 @@
         PFalg_col_t     col;      /**< error: column of error message */
     } err;
 
+    /* semantic content for cache operator */
+    struct {
+        char *          id;       /**< the cache id */
+        PFalg_col_t     item;     /**< item column */
+    } cache;
+
     /* semantic content for debug relation map operator */
     struct {
         PFalg_col_t      inner;    /**< name of the inner column */
@@ -381,6 +389,7 @@
         PFalg_col_t     item;     /**< column to look up the context nodes */
         PFalg_col_t     item_doc; /**< column to store the fragment info */
         PFalg_col_t     item_res; /**< column to store the resulting nodes */
+        const char *ns1, *loc1, *ns2, *loc2;
     } vx_lookup;
 };
 
@@ -795,6 +804,17 @@
 PFpa_op_t *PFpa_nil (void);
 
 /**
+ * Constructor for cache operator
+ */
+PFpa_op_t * PFpa_cache (const PFpa_op_t *n1, const PFpa_op_t *n2,
+                        char *id, PFalg_col_t item);
+
+/**
+ * Constructor for cache border operator
+ */
+PFpa_op_t * PFpa_cache_border (const PFpa_op_t *n);
+
+/**
  * Constructor for debug operator
  */
 PFpa_op_t * PFpa_trace (const PFpa_op_t *n1, const PFpa_op_t *n2);
@@ -916,7 +936,11 @@
                 PFalg_col_t item,
                 PFalg_col_t item_res,
                 PFalg_col_t item_doc,
-                bool id);
+                bool id,
+                const char* ns1,
+                const char* loc1,
+                const char* ns2,
+                const char* loc2);
 
 #endif  /* PHYSICAL_H */
 


------------------------------------------------------------------------------
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

Reply via email to