Avoid computing sql view rows when determining its feature type structure
-------------------------------------------------------------------------

                 Key: GEOT-3191
                 URL: http://jira.codehaus.org/browse/GEOT-3191
             Project: GeoTools
          Issue Type: Improvement
          Components: data jdbc-ng
    Affects Versions: 2.7-M1
            Reporter: Andrea Aime
            Assignee: Andrea Aime
             Fix For: 2.7-RC1


When buidling the sql view feature type a query is made to gather the recordset 
metadata. At the moment that query runs gathering one record on a few database 
types because the attempt to set the limit to 0 does not work, due some logic 
in applyLimitOffset in postgis, h2 and mysql databases. If the query to be 
execute involves aggregation or other heavy operations that might take forever 
to run (a user is reporting one minute of wait).

This patch makes sure no rows are ever retrieved. Tests seem to indicate it's 
working fine, though I cannot test db2 (the dialect has not changed, but the 
code in JDBCFeatureSource now says "st.setMaxRows(0);". 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to