Question

I'm thinking of creating a VIEW to speed up things and my question is: Are VIEWS per session/connection or global?

Example:

User Foo issues a query that creates a VIEW X, then user Foo continues to query
against VIEW X.  
Meanwhile, User Bar issues the same query that creates a VIEW X because the creation and the name is hard coded into the function issuing the query.

Now, does user Foo and user Bar work with the same VIEW X or do they have "private" VIEW X each?

Was it helpful?

Solution

They're created in the database and are not session bound. If the view actually is the same for the different sessions, you can just use CREATE OR REPLACE VIEW I think.

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