Question

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'
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top