Geographical indexing

Ivan Smahin ivan_smahin at paradigmasoft.com
Mon Apr 27 11:13:45 CDT 2009


Hello Thomas,

Monday, April 27, 2009, 6:38:37 PM, you wrote:

> Hi,


> did you have a look at this already?

Yes.

Firstly I run the app as is and get something similar to your result.
There is slight difference:

TestSQL: 1972 records time=3.754sec, loop_cnt=0, done
TestSQLBindings: 1972 records time=3.531sec, loop_cnt=0, done
TestFindRange: 1972 records time=3.135sec, loop_cnt=0, done

Meanwhile, it is always tends to be TestSQL > TestSQLBindings > TestFindRange
which is predictable result.

Then,  I  changed  TestSQL() and TestFindRange() to get pure difference
between pooled and not-pooled queries:

SELECT ... FROM ... WHERE false and (... conditions ... )

(...conditions... will be skipped during execution due to the optimization)

And result looks predictable too:

TestSQL: 0 records time=0.106sec, loop_cnt=0, done
TestSQLBindings: 0 records time=0.021sec, loop_cnt=0, done
TestFindRange: 1972 records time=3.135sec, loop_cnt=0, done


So you may see that pooled (binded) query runs faster then query which
is parsed each time.

Another  conclusion  is: FindRange takes almost all the time anyway
(Internally that sql-conditions produce similar to yours FindRange calls). So
in  this  particular  case  there is no much difference between that 3
ways.


> In the meantime I found another issue.
> There is a serious memoryleak somewhere in this FindRange-Function (VNET4.1)

> You can use the same test-program for this.
> Just put the TestFindRange() in a loop:

> While True
>       TestFindRange()
> End While

> and on my mashine after 5min all 2GB memory is done and windows is crashing.
> I added this into manits.

Ok I will check it.


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list