I'm new to using the MsSql2008FeatureSource and the HeatLayer technologies in the 5.0 release. The first issue I ran into, and "corrected" was that the primary key for my data is a Guid and that doesn't work, so I exported a set of data into a different table with an Int primary key for testing. I am using SQL Server 2008 Express but can use Enterprise if there is an issue with Express. My table consists of MapPointID (int), LocationDescription(varchar(255)), LocationLatitude and LocationLongitude(decimal(14,12), and MapPoint, a Geography data type in SRID 4269. I am using the CSharp VS2010 sample, "New Features > Load A Heat Layer" as reference code with my simple additions. When I changed to using the SQL feature source using the remaining code as an example everything worked fine. I then took a larger extract of data. I now have 593k rows and it gives an "out of memory" exception pretty quickly. I have attempted using the WhereClause property - even setting it to "WHERE MapPointID < 10" but it still fails. I did notice that when inspecting the SqlStatement in the ExecutingSqlStatementMsSql2008FeatureSourceEventArgs that it forced capitalization of the MapPointID - but I am not sure that really matters. I inspected those SqlStatements repeatedly and it seems like it keeps checking for the data type of the column. I think it would be much easier and more efficient if the SpatialDataType value was not read only so I could simply set it and reduce the large number of redundant large queries to figure out what it is.
Do you have any insights as to what I can do to help this? Most of the time I will be limiting results displayed on a county level, however there will be times it needs to be state level. Am I supposed to "convert" my SQL 2008 data into another type to be able to return larger datasets? I will realistically have 300k+ rows that will need to be used in a heat map frequently.
Please help ASAP. Thanks,
David