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'
Était-ce utile?

La 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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top