What Mark says is correct, but SQL Server (not familiar with Oracle) can index views as well, offering performance gains.
http://www.microsoft.com/sql/evaluation/features/indexed.asp -- jon mailto:[EMAIL PROTECTED] Wednesday, September 10, 2003, 2:13:54 PM, you wrote: AT> My understanding of a view is that it is recreated when you run your query. AT> At least in Oracle it does the joins under the hood at the time you request AT> your data. Thus, there should be no performance gains there. AT> DRE AT> -----Original Message----- AT> From: Mark Stewart [mailto:[EMAIL PROTECTED] AT> Sent: Wednesday, September 10, 2003 11:53 AM AT> To: CF-Talk AT> Subject: RE: Paging Principals AT> You need to be careful with this scenario because it may not be more AT> efficient, it depends upon your database schema. I tried this on an AT> application we were doing and our situation was that it was possible to AT> bring back 200 - 300k records (not likely, but possible). Our database was AT> created in such a way that even though we tried bringing back the top n AT> records, the query still had to "touch" every record in all the joined AT> tables. The result was minimal to no performance increase. The moral of the AT> story would be, it largely depends on your indexing and schema whether a AT> particular technique will work or not. AT> A view, as Jon mentioned, would be a very good idea since you wouldn't have AT> all the joins involved. The only thing you need to worry about with a view AT> is the inserting and updating on the underlying tables and what the AT> performance hit will be on back-end processing updating the view, especially AT> if you're relying on CF to do the inserting and updating. AT> Mark AT> -----Original Message----- AT> From: jon hall [mailto:[EMAIL PROTECTED] AT> Sent: Wednesday, September 10, 2003 12:57 PM AT> To: CF-Talk AT> Subject: Re: Paging Principals AT> Since most people are not going to browse through all 100 pages of AT> records, pulling a 1000 records for everyone, has some obvious AT> inefficiencies. AT> I'd go for individual queries on each page, but take the 8 join query AT> out of CF, and make it a view. The view will help lessen the impact of AT> that query, and make your code less complex at the same time. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

