Hi,

"Sven Steiniger" <[EMAIL PROTECTED]> writes:

> * JDBCDescriptorsStore 
>     configurable connection checking (passed in seconds)
>       <parameter name="checkinterval">60</parameter>
>     thus the check-connection statement is not always executed
>     for compatibility, the default value is 0 and the check is always performed.

Finally I found the time to do some performance tests with
some variants of a connection checking. I did a propfind 
of depth 1 on a directory with lots of children and complicated
permissions on a slow machine using Postgres 7.2 as a backend.

Some indices where added to the original scheme:
CREATE INDEX children_uri ON children(uri);
CREATE INDEX latestrevisions_uri ON latestrevisions(uri);
CREATE INDEX links_to ON links(linkto);
CREATE INDEX links_from ON links(link); 
CREATE INDEX permissions_object ON permissions(object);
CREATE INDEX revision_uri ON revision(uri);
CREATE INDEX property_revision ON property(uri,xnumber);

The data and configuration is closed to what we use in
production.

1) original JDBCDescriptorsStore  
2) modified JDBCDescriptorsStore where 
  isConnected returns  true if connection != null
  and the connection is not closed.
3) a subclass of JBDCDescriptorsStore, where 
  the test statement changed to 
 "select 1 from objects where uri = '/' ";
4)
 a subclass of JBDCDescriptorsStore, where 
  the test statement changed to 
 "select 1;

1) 545 - 572 seconds.
2) 115 - 131 seconds
3) 124 - 139 seconds
4) 114 - 139 seconds

The original test statement is really bad on postgres 
Maybe some  postgres expert could tell, how to improve the result.
The problem is, that postgres will no use the index, if
it checks for null. 

Not surprising, doing no checks is the fastest method.
However slide  will not survive the restart of the  
database or a temporary network error. Not nice for a 
server software.

JDBCDescriptorsStore with a improved test statement 
results in a  10-20% slower overall  performance than no
test statement but 4 times better performance
than the original test statement. It does not really matter
which test statement is used. In theory 4) should be a 
little bit faster than 3), but I can't measure it 
using a rather crude test. 

I would be very interested in observations using other databases.

Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to