Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Design Strategy and Views

Status
Not open for further replies.

christophorus

Technical User
Apr 3, 2006
9
US
I am writing a php interface to access a large (100 million + records) database which is broken into 50+ tables by state.

The script creates a temporary merge table with a union of the selected states depending on user input. I believe this will provide the largest reduction of unnecessary row scans.

I then query the temporary merge table with any additional criteria given by the user.

Is there a benefit if I create a view on the merge table to futher reduce unwanted rows and then query the view instead of the merge table directly? (I'm not really clear on how a view works. Does it actualy run the select query like a subquery?)

Thanks in advance, I am open to any thoughts on this concept!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top