|
I created sample complex feature layer based on tutorial provided in app-schema plugin which configured to connect to one parent and child table in database with limited records.
The WFS getfeature works fine with these limited number of records and shows child mapped elements correctly for each parent record.
Then I tried to test its performance with much larger records (1460 records for parent table, 45000 records for child table), calling getfeature on child table returns GML records after one minute but when I call getfeature on parent table ,CPU goes up around 70 percent and remain there for more than 10 minute and no respone even after this waiting period.
I found out that maybe I should use joining support by setting -Dapp-schema.joining=true in startup.sh of GeoServer.
After enabling joining support, even for the first sample (limited records), causes INCORRECT response to return by calling WFS getfeature for parent table.
Indeed it returns all child records as child mapped elements of first parent record in its GML response and no child mapped elements for other parent records (See the INCORRECT_RESPONSE.xml)
I also attached all of the GeoServer workspace content and sample tables DML and DDL.
To simulate test environment, you need to follow below steps.
1- Install GeoServer 2.2.4
2- Apply Application Schema plugin 2.2.4
3- Use the attached folder as GEOSERVER_DATA_DIR
4- Create sample parent and child table
5- Change database configuration (like IP,username ,password) in testptv_mini_tbllinesstops.xml and estptv_mini_tblline_main_operator_gen.xml
located in workspaces folder.
5- Edit startup.sh of GeoServer and add -Dapp-schema.joining=true as JVM argument in the last line
6- start server
7-Call getfeature for parent table like
http://IP/geoserver/ows?service=wfs&version=1.1.0&request=getfeature&typename=testptv:testptv_tblline_main_operator_gen
Parent Table: testptv_tblline_main_operator_gen
Child Table: tbllinesstops
Linking Column: lineid
All of the foreing key , unique key and index have been created.
|