2011-01-20 76 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

相關問題