Views are slower than regular lookups - only slightly but enough to notice.
Quoting Jeffry Houser <[EMAIL PROTECTED]>: > I think you said SQL Server, so why not create a view that pre-selects > those 7 columns? I suspect that will alleviate any performance concerns > you may have. > > Generally when developing databases, I try to keep database design to > what is "logically" correct. So, a table w/ 82 columns does not inherently > mean (to me) that the design is bad. > > > At 10:41 AM 4/22/2005, you wrote: > >So to sum up, the rows would effect the speed, but not the columns. Is > >that it? > > > >The reason I asked is because we have one table of 82 columns and we only > >work with 7 columns. To me that is just bad database design. So I thought > >it would be better if we split the table into two: one with the 7 columns > >we need and the other with 75 columns we don't every query, but since > >speed is not the factor, I don't really have good reasons to ask my boss > >to split it. > > > >Johnny > > > > > > > As with many things in the DBMS world, the answer is, "Maybe. It > > > depends." > > > The primary things that will affect your performance are the row size, > > > the > > > datatypes involved, and the indexing you have in place. Secondary to > > > that > > > will be hardware - things like the amount of memory and type of disk > > > storage. However, I doubt very much that you will see a performance > > > difference of 2x no matter what you try. > > > > > > -- > > > Eric > > > _____________________ > > > "Once the game is over, the King and the pawn go back in the same box. > > > " > > > -- Italian proverb > > > > > > > > > > > > > > > > > > > > > "Johnny > > Le" > > > > > > > > > > <[EMAIL PROTECTED] To: "SQL" > > <[email protected]> > > > > > > > > > cc: > > > > > > > > > > Subject: speed? > > > > > 04/22/2005 > > 09:53 > > > > > > > > > > AM > > > > > > > > > > Please respond > > to > > > > > > > > > > sql > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > Does the number of columns in a table effect the performance? For > > > example, > > > I want to select 7 fields and 100 rows of a 7 column table with > > > > millions of > > > rows. Will that be faster than if I select 7 fields and 100 rows of > > > an 82 > > > column table with millions of rows? So 7 vs. 82 columns. All other > > > factors remain the same. I am using MS SQL Server 2000. I would > > > think it > > > is faster. What do you think? If it is indeed faster, how much faster > > > are > > > we talking about here? double or tripple the speed? > > > > > > Johnny > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Save $10 Download ZoneAlarm Security Suite http://www.houseoffusion.com/banners/view.cfm?bannerid=66 Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2244 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
