Suppose I have a table having a thousand or more users. If I create a view for each user does it affect performance?
CREATE VIEW vw_userid of user AS
SELECT *
FROM Updates
WHERE userid='userid of user'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think in your case it is effecting, coz first query will read a table & generate view, Again it will do read operation to Retrieve data, Also you are creating view in run time so every time it will consume memory.If I/O request will be more then your server may become unresponsive. i will suggest to go with Select statement will be better for you.