473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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
Nov 12 '05 #1
1 1521
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


wh***********@yahoo.com.tw (Jason) wrote in message news:<53**************************@posting.google. com>...
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

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom | last post by:
How much of a performance gain can you get from precompiling your RE's.
5
by: Ben Long | last post by:
Hi All, A partner of mine has been charged with identifying a performance / load problem currently experienced on one of our websites. I'm thinking it may be a combination of HTML formatting...
3
by: Ray Greene | last post by:
SQL newbie alert... I have a table with the fields Location, MachineName ,Hours and Date. (The actual database is more complex but it will do for the purposes of this post) I want to return...
2
by: Wayne Wengert | last post by:
I have an XML document (see below) in which I have a <COMPANY> element that, in turn, contains other elements. Based on an example I saw somewhere I coded it as shown in the sample. In purusing...
4
by: Cezar | last post by:
Hi, I need to display the content of an ArrayList on multiple columns, like data1 data2 data3 data4 data5 data6 data7 data8 ---- or data1 data3 data5 data7
2
by: Harvey, Allan AC | last post by:
Hi all, I was hoping someone might be able to set me straight so that I can get some select performance improvements. The table in question has several thousand rows currently, planning several...
15
by: Rob Meade | last post by:
Hi all, I have a databse which I'm pulling the data from for my ASP page. I have 4 tables, Course, Feature, Objective, and PreRequisite. The last three all contain a course product code and a...
1
by: Hetal | last post by:
Hi... We are on Visual Basic .NET 2003 and i am using DataView to sort the DataTable. However, we are facing problems with sorting the data based on multiple columns. The below statement to...
2
by: william.david.anderson | last post by:
Hi there, I'm thinking of using a PREPARE statement inside a stored procedure, but am wondering about the performance penalty associated with calling PREPARE multiple times. Below is an...
3
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, I have built an application containing a few projects (nothing that I have written)and there are a few compiler warnings (obsolete methods and the like). Does anyone know if these obsolete...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.