CREATE OR REPLACE VIEW in production applications

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Pavilion
Forum Contributor
Posts: 301
Joined: Thu Feb 23, 2012 6:51 am

CREATE OR REPLACE VIEW in production applications

Post by Pavilion »

Hello Everyone:

Before doing this I want to make sure it will work in a robust production application, so I'm posting this and hoping for some good advice.

Goal: To display a list of all possible activity participants and check only those participants who are active

My current approach is as follows:
  1. CREATE OR REPLACE VIEW selecting from list of active participants - (VW_ActivityParticipants).
  2. run a SELECT on the VIEW and a table of all possible participants (CrossRefTbl) with a LEFT JOIN between CrossRefTbl and VW_ActivityParticipants
  3. By doing this, it's possible for me to determine which participants need to be flagged as active.
However - I fear in production with multiple users triggering the CREATE OR REPLACE VIEW SQL statement at the same time, the application will run into problems. And I want to make sure this approach is legitimate in a production environment.

Any feedback from all of you is appreciated, thanks much: Pavilion
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: CREATE OR REPLACE VIEW in production applications

Post by requinix »

Don't bother with a view - just use a normal SELECT. If you need help with that then we need to see the tables you're working with and the results you want to get.
Post Reply