Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23486/src/backends/monet5

Modified Files:
        sql.mx 
Log Message:
propagated changes of Thursday Feb 11 2010 - Friday Feb 12 2010
from the Feb2010 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/02/11 - stmane: src/backends/monet5/sql.mx,1.389.2.3
  
  BATpreload_() & BATpreload() now have a second argument,
  that takes a hint for the access pattern used on the preloaded heaps
  (BUF_{NORMAL,RANDOM,SEQUENTIAL,WILLNEED,DONTNEED}).
  
  BATprealod_() *could* than use to give mmap advise by calling BATmadvise()
  with the given hint for thet BUN heaps (and BUF_WILLNEED (or BUF_RANDOM ?))
  for the string heaps due to their inherently random access.
  For now, calling BATmadvise() has not been activated in BATpreload_(),
  mainly as (1) the effects have not yet been ananlysed in detail and
  (2) the given advise might need to be un-/re-set after using the heaps
  to ensure proper memory management.
  
  Hence, this checkin in mainly to record the BUN heap access pattern
  (BUF_SEQUENTIAL or BUF_WILLNEED (for both random and repeated access))
  of each currently present BATpreload{_,}() call.
  
  I also commented out some effectless BATpreload_(bn) on newly allocated
  result BATs, and added BATpreload_() for the input, instead.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/02/11 - stmane: src/backends/monet5/sql.mx,1.389.2.4
  
  use BATpreload_() instead of BATpreload()
  to make sure, we only prealod the data
  that we do actually access,
  i.e., (in case of views)
  that part of the BUNheaps that the view can see,
  not the complete underlying BUNheaps of the
  parent BAT(s).
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/02/11 - stmane: src/backends/monet5/sql.mx,1.389.2.5
  
  extended BATpreload() interface to specify
  which heaps are actually used:
  - HEAD (BUNs + string heap)
  - TAIL (BUNs + string heap)
  - head HASH
  - tail HASH
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.394
retrieving revision 1.395
diff -u -d -r1.394 -r1.395
--- sql.mx      11 Feb 2010 21:58:22 -0000      1.394
+++ sql.mx      12 Feb 2010 09:36:17 -0000      1.395
@@ -2311,7 +2311,7 @@
        if ( t == NULL)
                throw(MAL,"sql.append","Table missing");
        if (tpe == TYPE_bat)
-               BATpreload((BAT*)ins);  
+               BATpreload_((BAT*)ins, USE_ALL, BUF_SEQUENTIAL);        
        c = mvc_bind_column(m, t, cname);
        if (c) {
                store_funcs.append_col(m->session->tr, c, ins, tpe);
@@ -2358,7 +2358,7 @@
        if ( t == NULL)
                throw(MAL,"sql.update","Table missing");
        if (tpe == TYPE_bat)
-               BATpreload((BAT*)ins);  
+               BATpreload_((BAT*)ins, USE_ALL, BUF_SEQUENTIAL);        
        c = mvc_bind_column(m, t, cname);
        if (c) {
                store_funcs.update_col(m->session->tr, c, ins, tpe, 0);
@@ -3339,7 +3339,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, ty...@1, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload_(b, USE_HEAD|USE_TAIL, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                str v = (str)BUNtail(bi,p);
                @1 r;
@@ -3367,7 +3367,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, ty...@1, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload_(b, USE_HEAD|USE_TAIL, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                str v = (str)BUNtail(bi,p);
                @1 r;
@@ -3490,7 +3490,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, ty...@1, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload_(b, USE_HEAD|USE_TAIL, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                str v = (str)BUNtail(bi,p);
                @3 r;
@@ -3605,7 +3605,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, TYPE_str, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload_(b, USE_HEAD|USE_TAIL, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                ptr v = (ptr)BUNtail(bi,p);
                msg = SQLstr_cast_( &r, m, *eclass, *d1, *s1, *has_tz, v, 
b->ttype, *digits);


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to