OK - I'm very new to all this - but one of the main things I'm evaluating is SQL 2008 functionality - and obviuosly key to all this is speed.
I've been testing with a table of relatively complex site boundaries scattered over the whole country (Shape file was c. 100MB and has 30K records) - so not small - but not particularly big either I'd suggest.
Initially I was rather disappointed with perfomance - slow to load, slow to draw entire layer (which I realise is never going to be that quick dragging all the data from the database - and is probably best addressed by limiting zoom) - but what I was particulalry disappointed with was a 5-7 second lag every time I panned the map - even when zoomed in quite close (i.e. only drawing 20-30 polygons).
Using query analyzer I had a look at what was going on - and to cut to the chase - I managed to improve the speed when close in from 7 seconds to almost instant by altering SQL server spatial index Grids and cells per object (in creased to 64 and set everything else at low). Obvioulsy on my dataset - when zoomed in close the indexing was not excluding enough records before perfoming teh full spatial query. Obviously different datasets may require different settings - but the improvements are dramatic - and I'm much happier now !
I appreciate this is is some ways nothing to do with MapSuite - but thought it worth reporting given the threads I've seen on SQL performance. Also I wondered if you had any general guidelines on this (accepting that it will to some extent be dataset specific)
Reading the threads I have seen a couple of other techniques discussed that I have yet to try:
- Holding the SQL connection open - to save open / close all the time. How is this achieved? My code just passes the connetcion string - is there a way to pass a connection object instead ?
- Caching - I've seen this referred to a bit - is there a description of what this actually does please (data stored locally ?)
- How to implement.
- How to destroy (i.e. force a refresh for changed data)
- When its likely to help (I'm thinking that if repeatedly displaying all data from a table - e.g. zoomed to country level - then this could have some dramtic effects - but also consume lots of disk space !
- Where is the cahce located - disk / memory ? If disk is there any way of having users share it ?
Final question is about how if you aare updating spatial objects in SQL server (and presumably attribute data as well) - how is locking handled. Or do I really need to look at handling all this outside of MapSuite. Any best practice / examples
Many Thanks