Re: Performance of View vs. Table
Posted in 2000
Did I imply that using a view would improve performance over using the base table? If so, I apologize, I most definitely didn't mean to! In article <391192DF.6870D4F6@americasm01.nt.com>, Rudy Fernandes <rferdy@americasm01.nt.com> wrote: > A view never helps performance. In your case, it would just be a sort of > mask on the base table. In more typical view definitions, all that happens > is that SQL gets simplified. > > If you want improved performance, a new table may be the answer if it > reduces the total size of the data significantly. > > Additionally, a new table gives you more flexibility in terms of > - indexes : customizing them to suit your analysis > - pre-grouping : if all your queries always group by some columns in this > new table (e.g sum(amount) group by dept), you could make that part of the > process that creates the table (from the source data) in the first place. > - fragmentation > > But, as pointed out, you run risks in terms of integrity, stale data, etc. > > Rudy > > Richard Spitz wrote: > > > Hi Informixers, > > > > in order to facilitate analysis of certain sub-groups in a table > > containing about 1 million rows, I was asked to create a new table > > that just contains certain fields of those rows that meet specific > > criteria, in the hope that joining this new table with other tables > > will yield much better performance, especially when "group by" > > etc. is involved. > > > > Will it be sufficient to just create a view that meets the definition, > > or must I really create and populate a new table? > > > > Regards, Richard > > -- > > +--------------------------+------------------------------------------+ > > | Dr. med Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | > > | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | > > | Klinikum Grosshadern | FAX : +49-89-7095-6420 | > > | 81366 Munich, Germany | GSM : +49-172-8933578 | > > +--------------------------+------------------------------------------+ > > -- # unrm / ksh: unrm: not found # man cpio Sent via Deja.com http://www.deja.com/ Before you buy.