Home » RDBMS Server » Performance Tuning » Does providing a Numeric value in Single quotes affects performance
Does providing a Numeric value in Single quotes affects performance [message #65570] Mon, 01 November 2004 02:23 Go to next message
sangeeta Prabhu
Messages: 8
Registered: October 2004
Junior Member
Hi All,

I have a Table which is having a field datatype as character and the values storedd in the column are Numeric like 00057,00058 and so on.

Whenever I have to use this column in the where condition I have to specify the values in Single quotes.

My question is does providing a numeric value in Single quote in a query affects performance.

This is the script of the Table:-

SQL> desc tcomp_rep
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ---------------------
 COMP_REP_ID_C                                         NOT NULL NUMBER
 ORG_ID_C                                              NOT NULL NUMBER
 ORG_NME_SEQ_C                                         NOT NULL NUMBER
 JURIS_ID_C                                                     CHAR(5)
 SVC_C                                                 NOT NULL CHAR(6)
 PROD_SEQ_UNQ_Q                                                 NUMBER
 AFFLN_ID_C                                                     NUMBER
 AFFLN_SUB_ID_C                                                 NUMBER
 CA_UNIT_Q                                             NOT NULL NUMBER
 COMP_REP_HIST_I                                       NOT NULL CHAR(1)
 CREP_LAST_BILL_D                                               DATE
 CREP_BILL_THRU_D                                               DATE
 CRP_PR_LAST_BILL_D                                             DATE
 CRP_PR_BILL_THRU_D                                             DATE
 STATE_ID_C                                                     CHAR(10)
 FILING_D                                                       DATE
 CT_APNT_D                                                      DATE
 SVC_STRT_D                                                     DATE
 DISCON_D                                                       DATE
 DISCON_REAS_C                                                  CHAR(6)
 REINST_D                                                       DATE
 COMP_REP_STAT_C                                                CHAR(6)
 SVC_BASE_PRC_M                                                 NUMBER(7,2)
 RNWL_FRST_DOM_I                                       NOT NULL CHAR(1)
 ADDED_BY_C                                            NOT NULL CHAR(8)
 ADDED_Z                                               NOT NULL DATE
 MODIFIED_BY_C                                         NOT NULL CHAR(8)
 MODIFIED_Z                                            NOT NULL DATE
 EXTEND_MISC_DESC_T                                    NOT NULL VARCHAR2(855)

JURIS_ID_C  field is having values '00030' '00031' etc.

Thanks in Advance

 
Re: Does providing a Numeric value in Single quotes affects performance [message #65571 is a reply to message #65570] Mon, 01 November 2004 08:00 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
No, it looks like it could be a number, but maybe it is really is that way so that valid user data could contain strings. Does that data originate in this system - or is it entered through and interface/screen? The leading zeros might be significant to the user.

You could test the data in that column to see if it's all numeric.

select max(to_number(my_col)) from my_table;

If you get "numeric or value error" then they aren't clean numbers.
Previous Topic: Urgent:-help in rewriting an SQL
Next Topic: Performance tuning
Goto Forum:
  


Current Time: Sun Dec 22 23:25:59 CST 2024