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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Are stored views faster than SQL?

Status
Not open for further replies.

kd5oyd

Programmer
Nov 20, 2001
9
US
I have a series of views the customer will never see, but the program runs repeatedly (1000s of times.) I can create the views in advance or on the fly from a code module, and I'm wondering how much of a speed difference there is. I'd rather execute SQL statements from the code (I'm not on speaking terms with the query designer) but not if it noticeably robs me of performance.
 
HI
I am not aware so far that the vies are executing faster than SQL code syntax.

The advantages with view are that we create and save that. Whenever we need, we just open it as if it is a table. So it is programmer friendly and no need to code it again and again. In my FP2.6 days, I had a similar OOPS approach in all my programs. These so called views were coded by my in separate functions.. and I used to call the functions saved by me as we say USE myView... =myVIew1(myFilterVariable)
IN result everything was same.

Unless someone else says something else, I do not find and major problem.

Regardless, think of REMOTE use and scalling for backend servers. The views will be handy. SQL codes will be in many of your routines and events and methods. Views are at one place to effect changes. Is this not a clear advantage to go with views ? Or if you want to collect all the SQL codes in functions as I specified earlier, is it not the same as views?

Think yourself. I will go with views. VFP has more ways of doing things than one can think of :)


ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
HI,
To add one more point.. views stored in the DBC are run ONLY when you query them and so 1000s of views do not make any performance degrade, unless you open them all.

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top