Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Table Naming Conventions

RE: Table Naming Conventions

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Tue, 30 Jul 2002 20:08:18 -0800
Message-ID: <F001.004A6DA6.20020730200818@fatcity.com>


Rachel, one of the SQL statements in our Clinic that people find the hardest to optimize is one that has a thing that looks like "id_number = 10000" in the where clause. "id_number" is the table's primary key, yet the query spends 20 seconds executing a full-table scan. Any guesses?

It's because "id_number" was actually defined as a varchar2 column. Oracle's implicit type coercion converts the predicate into "to_number(id_number) = 10000". Presto: the PK index is useless.

This and dozens of other unnecessarily pathological problems await people who try to embed too much information into their names.

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com

Upcoming events:

- NCOAUG Training Day, Aug 16 Chicago
- Miracle Database Forum, Sep 20-22 Middlefart Denmark
- 2003 Hotsos Symposium on OracleR System Performance, Feb 9-12 Dallas



-----Original Message-----
Carmichael
Sent: Tuesday, July 30, 2002 8:09 PM
To: Multiple recipients of list ORACLE-L

I can see your point, In the data warehouse we are building here, the modeler is planning on prefixing tables with the type of table (D_ for dimension tables, F_ for fact, etc)

Hm, you mean we have to go back and revisit the naming standards that they developed? Can I please suffix the column names with an indicator of the datatype? :)

The biggest problem is that most management wants "naming standards"...

Rachel


Do You Yahoo!?
Yahoo! Health - Feel better, live better http://health.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  INET: wisernet100_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Cary Millsap
  INET: cary.millsap_at_hotsos.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jul 30 2002 - 23:08:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US