Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.7.4
-
Fix Version/s: 2.7.5
-
Component/s: jdbc-sqlserver plugin
-
Labels:None
-
Environment:Geoserver 2.1-SNAPSHOT
Apache Tomcat 6.0
6.0.33 1.6.0_24-b07 Sun Microsystems Inc.
Windows Server 2008 x86
Description
I am trying to attach a large table (18million rows) from SQL2008 to geoserver. When creating the new layer from within geoserver or reloading geoserver the following call is being run on SQL Server.
SELECT "geom".STSrid FROM "theTable" WHERE "geom" IS NOT NULL.
This loads 18 million rows to query the Srid.
I suggest that SQLServerDialect.java is updated to select just the 1 required row. In particular Line 155 which is in the getGeometrySRID function should be updated from:
StringBuffer sql = new StringBuffer("SELECT ");
To
StringBuffer sql = new StringBuffer("SELECT TOP 1 ");
Activity
Ken Bisland
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | Large Dataset Fix.patch [ 59258 ] |
Andrea Aime
made changes -
| Assignee | Andrea Aime [ aaime ] |
Andrea Aime
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.7.5 [ 18236 ] | |
| Resolution | Fixed [ 1 ] |