473,386 Members | 1,706 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,386 software developers and data experts.

Perfomance hint

I have a table on wich I perfom an indexed search like

SELECT * FROM MYTABLE WHERE MYFIELD = ?

I'm designing the table and I can decide the type
of column MYFIELD. The two choices are:
1) CHAR(14)
2) DECIMAL(14)
In which case I will reach the best performances?

Thanks a lot.

Bye

Franco
Nov 12 '05 #1
2 1636
I would think: the shorter the field the better.
Dec(14) takes 8 bytes and Char(14) 14 bytes.
Franco Lombardo wrote:
I have a table on wich I perfom an indexed search like

SELECT * FROM MYTABLE WHERE MYFIELD = ?

I'm designing the table and I can decide the type
of column MYFIELD. The two choices are:
1) CHAR(14)
2) DECIMAL(14)
In which case I will reach the best performances?

Thanks a lot.

Bye

Franco


Nov 12 '05 #2
I suspect you'll find the performance to be almost identical. You should
choose the value of MYFIELD based on business requirements, not performance
considerations. If it has a decimal value, use DECIMAL. If it can take any
sequence of 14 characters, choose CHAR. If it's a YYYYMMDDHHMMSS timestamp
(that 14 makes me suspicious), use a TIMESTAMP.

"Franco Lombardo" <f_********@hotmail.com> wrote in message
news:c5************@ID-100339.news.uni-berlin.de...
I have a table on wich I perfom an indexed search like

SELECT * FROM MYTABLE WHERE MYFIELD = ?

I'm designing the table and I can decide the type
of column MYFIELD. The two choices are:
1) CHAR(14)
2) DECIMAL(14)
In which case I will reach the best performances?

Thanks a lot.

Bye

Franco

Nov 12 '05 #3

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

Similar topics

6
by: Mark P | last post by:
Some time ago I posted here about inserting into a set with a hint: ...
7
by: piperzen | last post by:
Hi, I'm developing a set of language learning exercises for http://www.yale.edu/swahili , and we've run into a javascript question that the programmer doesn't know how to tackle (we mostly work...
2
by: news.onet.pl | last post by:
I've launched some perfomance test for some program measuring number of operations, net messages processed per second, etc. Why is my point, is the question how Java initial and maximal heap is...
2
by: James T. | last post by:
Hello! Let's say I have 2 functions, both return data from the database. Now I would like to compare perfomance of these two functions. I would like to know how long it takes to execute these...
0
by: jambalapamba | last post by:
Hi I am removing node from a document depending on the style property and this is taking 7 seconds for checking complete document is there any ideas how can i improve the perfomance. Here is...
4
by: =?Utf-8?B?VmVlcmFiaGFkcmFpYWggTCBN?= | last post by:
Hi, I have two databases D1 with 6 million records and D2 with 95 thousand records. I need to check Common records from these two databases based on UserID and need to insert into other database...
3
by: damodharan | last post by:
Hello and thanks in advance. I have two table in DB2 (ver 8). table details are table one(Cust_det) has two fields (Cust_cin and cust_name). table two(cust_add_det) has cust_cin and...
2
by: MickJ | last post by:
Hi, I would like to write High perfomance server using C#. It would be desirable to hear offers and advices on this subject.
4
by: Alexander Adam | last post by:
Hi! I've got a pretty complex data structure that keeps instances of structs allocated with the new operator. Now my issue is that those structures are required to be allocated / deallocated...
0
by: ferozanna | last post by:
I am using Asp.net 1.3 with C# My application used by call center people My applicaton is a three tier arch I have create data layer as class ibrary which goint to talke Ssqlserver 205 db ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.