hmiura
asked on
Is there an order of precedence in executing SQL commands?
I have a very large database, with about 1 million users and also a large number of queries running simultaneously. Sometimes the database freezes. It only reads records (SELECT), but does not make any INSERTS nor UPDATES.
I guess the INSERTS get stuck in the spool.
Is there an order of precedence in executing these SQL commands? Does SQL server first do all SELECTS and them execute INSERTS and UPDATES?
Is there a solution for this? Basicly the INSERTs and UPDATEs are used for my Ad Server (check if the media exists, insert or update click and pageview records).
I guess the INSERTS get stuck in the spool.
Is there an order of precedence in executing these SQL commands? Does SQL server first do all SELECTS and them execute INSERTS and UPDATES?
Is there a solution for this? Basicly the INSERTs and UPDATEs are used for my Ad Server (check if the media exists, insert or update click and pageview records).
"with about 1 million users" ?? USERS?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"1 million users" ... I mean registered users. Not everybody at the same time. But we have a very high number of pageviews and user interaction within the portal.
ASKER
Thanks for your help. I'll try creating more indexes and see if it really keeps DB cool.
Just a side note -- Indexes help with READ (Select) performance, at the expense of WRITE (Update/Insert) performance. If you add additional indexes, do not be surprised if insert/update performance gets worse.
What you might want to check is to see whether the index/updates are being blocked... (you should be able to see that in the activity monitor or the sp_who stored procedure.)
What you might want to check is to see whether the index/updates are being blocked... (you should be able to see that in the activity monitor or the sp_who stored procedure.)