[fdo-users] King MS SQL Spatial performance problem

Binter Jan Jan.Binter at xanadu.cz
Tue Jul 17 02:57:12 EDT 2007


Hi Haris,
identity column is one half of the wrong condition, the second part is
from ST.FilterQuery which return different column name and this cause
the problem.
The query expects same column name returned by function as is column
name in table, but function return always same column name regardless of
identity column in table. See again the example from profiler:
SELECT a1.GEOM, a1.id, a1.GEOM_Envelope_MinX, a1.GEOM_Envelope_MinY,
a1.GEOM_Envelope_MaxX, a1.GEOM_Envelope_MaxY FROM 
ST.FilterQuery(''dbo.pokus'', ''GEOM'', at P1) AS sf1 INNER JOIN dbo.pokus
AS a1 ON  sf1.id = a1.id 

See join condition sf1.id = a1.id. When we change column name from id to
eg. identity, this statement will change to: sf1.identity = a1.identity.
But the function ST.FilterQuery return column name OID and this is the
bug. 

	Jan

> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-
> bounces at lists.osgeo.org] On Behalf Of Haris Kurtagic
> Sent: Friday, June 29, 2007 11:54 AM
> To: FDO Users Mail List
> Subject: RE: [fdo-users] King MS SQL Spatial performance problem
> 
> Hi Jan,
> 
> I am not sure if I am interpreting emails correctly, anyhow:
> 
> FDO provider is using identity column to create a JOIN.
> Column name can be any name not just ID or OID it is important that
> column is set as IDENTITY column in SQL Server.
> 
> Have you created 'dbo.pokus' table with Fdo2Fdo ( It will set identity
> column when copying data ) or some other way ?
> 
> Haris
> 
> 
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Binter Jan
> Sent: Friday, June 29, 2007 9:54 AM
> To: FDO Users Mail List
> Subject: RE: [fdo-users] King MS SQL Spatial performance problem
> 
> The problem is that FDO provider expect different value name in
> ST.FilterQuery function than it is in the function. FDO expect "ID"
but
> in function is "OID".
> To be sure the problem is really in the name we tried to change
> ST.FilterQuery function which is part of MS SQL Spatial. We changed
only
> the name from "OID" to "ID" and then it works.
> Same problem is also in ST.RelateQuery function.
> 	Regards Jan
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users


More information about the fdo-users mailing list