Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / December 2003

Tip: Looking for answers? Try searching our database.

Which gain better performance : multiple columns or use SQL built-in function?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 26 Dec 2003 10:30 GMT
Hi all,
I have 1 table which need to store 7 days data in a row, I not sure
which table design will gain better performance in SELECT statement.
Desgin 1. 7 columns (day1, ..., day7) with char(4)
or
Desgin 2. 1 column (day_1_to_7) with char(28); to retrieve the data,
use substr function

Plz advise.
Thanks!
Whitepaper
Sathyaram - 26 Dec 2003 16:16 GMT
Though it depends on your application, my thought is that your Design
1 will perform better and easy to maintain ..  Design 1 will eliminate
the overhead of SUBSTR function

Cheers
Sathyaram
www.db2click.com

> Hi all,
> I have 1 table which need to store 7 days data in a row, I not sure
[quoted text clipped - 7 lines]
> Thanks!
> Whitepaper
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.