On Fri, Mar 16, 2012 at 12:31 PM, Bisland, Kenneth <[email protected]> wrote: > Hi, > > > > 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. > > > > That is a very large query on 18 million rows. I assume this is to look up > the SRID of the table. Can this query be disabled or rewritten to return > only a few rows?
Yes, it can be done, but it requires a code change in this GeoTools class: http://svn.osgeo.org/geotools/trunk/modules/plugin/jdbc/jdbc-sqlserver/src/main/java/org/geotools/data/sqlserver/SQLServerDialect.java Patches welcomed :-) Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 339 8844549 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
