SQL Server Performance Forum – Threads Archive
SQL Behaviour in Multiuser ModeHi All
I want to know that i am making a package that requires a lot of business logic(like calculations etc.) which are unique for every user. So i need to store them temporarily
till i fetch them from my front end. Initially i used Cursor for this but as i came to know that their use should be minimised, then i started using Hash Tables. I tested it and didn’t got any flaws. My Question is in a situation like this when we have more than 150 users working concurrently, will hash tables will solve my whole purpose or should i use some thing
that i will be suggested by You all. Silicon Master
Can’t you test your solution under working conditions to see if it is reliable? —
Microsoft SQL Server MVP
Heute schon gebloggt?http://www.insidesql.de/blogs
The question doesn’t provide enough info about your approach to form an opinion about it.
I am sorry if i falied to provide enough information which should have made you all understand. Basically i want to know in general how to go about it or which path to follow when we
have to fetch data for multiple users from database concurrently like(a teacher logs into a school
and view its time schedule,so we need to store the schedule temp. untill it is fetched by front end.) This can be done through Cursors. But i want to know the best method to go about it. If i use Hash Tables then they are working perfectly under my situaution till now( Full Stress Testing has not been done till now.) or it may happen that two users login at thr same time and schedule of one teacher is overidden by another teacher because of same hash table being used. I think now an better in communicating, if not please let me know. Silicon Master
So you’re processing data to create a schedule. You’re gathering data from tables, filtering here and there, perhaps doing some calculations. Is there anything in this processing that cannot be done in a data retrieval query based on those tables? IOW, you’re using hash tables, but do you really need them? Have you looked at indexed views?
Hi Adriaan Ya there are few thing that cannot be done through sql queries i need some tables those belong to different databases and through their relationship i need to calculate few things(done in sp).Thats why i have used Hash Tables. I need differnet tables for calculations and need to store
the refined data in one place till it is displayed. Silicon Master
You do know that you can refer to a table like database.owner.table? As long as the current login has access to the other database, you can use this in any sp or view or ad-hoc query in your database, joining to local tables. The best option is to create a view that refers to the external table. In case you need to change the reference (database name change …) you only have to alter the view, not your sp-s that depend on the external reference.