Anthony McCallum ha scritto:
> Hi Andrea,
> 
> I'm beginning some deeper digging into the geotools JUnit tests.  Right 
> now I'm looking at the postgis tests to get an idea of the number and 
> types of tests we need to implement.  I've noticed that in the main 
> postigs test folder, there is also a subfolder titled "ps" which appears 
> to contain a copy of some of the tests in the parent folder.  What is 
> the purpose of this "ps" folder and the tests inside?  Will we need 
> something similar for ingres?

ps -> prepared statements

In JDBCDataStore there are two code paths, one using plain sql and
one using prepared statements.
The PostGIS data store has been implemented with both options, since
they provide different features:
- prepared statements cannot be attacked by sql injection and
   are slightly faster if you keep on returning very small amounts
   of data because the query optimizer runs just once
   and stores the execution plan and reuses it over and over (so
   no parsing and optimizing at every query, but only the first time)
- straight statements with non parametrized sql are faster when you
   read a lot of data in one go because the optimizer can look at the
   param and better judge what indexes to use (or if to use them)
   depending on the actual values in the query

So the ps folder contains classes that will run tests with a prepared
statement dialect, and the main one with straight sql.
Other databases are implemented with just one option usually because
of lack of time.

Hope this helps
Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to