VServer temp join table

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Fri Sep 17 09:17:52 CDT 2010


On 9/17/10 4:03 PM, "Justin Drury" <justin at crunch-recording.com> wrote:

Hi Justin,

> I've been playing around with VServer and so far, very impressive!
> 
> I have an issue though...
> 
> I retrieve from other sources an array of recid's.  I now need to search
> against the vserved database for these recids.  There can be a LOT of them(so
> doing a select where recid in ()) can fail[too many values]- this one was
> about 200,000).  Locally I got around this by building a  table with an
> object_ptr field pointing to the record id and then doing a left join on the
> main table.


> The problem with that approach was the speed on the server side. (Both
> updating the table and the join).  I tried a binary link with a 1:M
> relationship and while the query / join on the server was blazing, the insert
> of the recid's was brutal(presumably because each link Records call had a lot
> of overhead)

TIP:

Speed of insert of many values into tmp table, can be improved I think,
If do 
      curs.ImportTextFile()

Where TextFille will contains your 200K values.

File will be on client side, zipped, transferred to server side, unziped,
and imported very fast into your tmp table.
 

> What would be awesome is if I could just somehow pass a bitset!  That way I
> could say...ok server, take this bitset match it up on the main database and
> give me the results sorted by...x and grouped by n.  But nothing in the C++
> SDK jumps out.

What about this method and similar:

virtual BitSet_Ptr            FindValue(
         Const_I_Value_Ptr   inValue = NULL,
         Const_BitSet_Ptr     inSelection = NULL,
         ESearch                inSearchPref = kPreferIndexed  ) const = 0;


InSelection a a bitset in the scope of which will be done next search.

 
> Offlist, Ruslan mentioned a temporary table, I guess I need more info on
> this... [example sql?] what possible optimizations can I do?  Is there such a
> thing as a temporary client side table that can be pushed / committed to the
> server after being built.

VCLIENT itself do not work with tables.


Just few days ago, we have comit to CVS, new API method
    CopeCursorToNewTable()

Just uploaded V4CC 4.8b6  already have it.


This method allows you e.g. copy cursor from remote db1 to LOCAL client side
db2 (disk or RAM).

So we adding new tools for your hands :-)


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list