I need to decrease the amount of time it takes to return a set of data of the following format:
State[Provided vai user intput]->All Counties in State->All Cities in County->All Zones in City[usually < 50 or 75 per city]
current behavior:
1. currently user selects state all counties are returned from db
2. foreach county cities are returned
3. foreach city streets are returned
4. objects hydrated with data & display drawn
As you can see this gets expensive. I know there has to be a better way to do this. Any suggestions? We use sql server/c#.net.Unclear what you want here. If you just want to return all the counties, cities, streets, etc for a given State, just use a multi-table query with indexed foreign keys.|||Are you using Cursors or subqueries to retrive all those informations ?|||hydrated??|||Look it up in Books Online, Rudy.|||thank you, but i couldn't find it
would you be kind enough to give me the exact url|||Ha! Made you look!
Sorry, Rudy, but for some reason at 12:30 last night the idea of you searching Books Online for "hydrated" seemed hillariously funny to me.
D'oh!|||yeah, well, i even tried google, searching for "microsoft sql server hydrate"
found this -- http://www.devarticles.com/showblog/345/Could-you-pee-on-my-sandwich-please|||The order of data retrieval looks a little backwards, - should you let the user select a country first? And don't you have a relation between countries and states?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment