2011-01-20 77 views
0

我正在考虑创建一个视图来加快速度,我的问题是:每个会话/连接或全局视图?MySQL,视图是全局还是每个会话/连接?

例子:

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. 

现在,做用户Foo和用相同的观点X的用户酒吧工作或做他们的 “私人” VIEW X每一个?

回答

1

它们在数据库中创建并且不受会话限制。如果视图对于不同的会话实际上是相同的,那么您可以使用CREATE OR REPLACE VIEW我认为。

+0

+1好的,谢谢你解决这个问题。 – 2011-01-23 13:52:14

相关问题