Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 21632 invoked from network); 12 Dec 2007 17:56:45 -0600
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by static-ip-69-64-49-119.inaddr.intergenia.de with SMTP; 12 Dec 2007 17:56:45 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 913B17D82B1;
 Wed, 12 Dec 2007 18:56:46 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 00951-05; Wed, 12 Dec 2007 18:56:46 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0CBC17D7C31;
 Wed, 12 Dec 2007 18:56:46 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 12 Dec 2007 18:09:49 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B0FBE7D8762
 for <oracle-l@freelists.org>; Wed, 12 Dec 2007 18:09:49 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 24076-06 for <oracle-l@freelists.org>;
 Wed, 12 Dec 2007 18:09:49 -0500 (EST)
Received: from mx04.mailboxcop.com (mx04.mailboxcop.com [206.125.223.74])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6E1857D868B
 for <oracle-l@freelists.org>; Wed, 12 Dec 2007 18:09:49 -0500 (EST)
Received: from secure9.apollohosting.com (secure9.apollohosting.com [206.125.217.251])
 by mx04.mailboxcop.com (8.13.8/8.13.8) with ESMTP id lBCN9max006795
 for <oracle-l@freelists.org>; Wed, 12 Dec 2007 17:09:48 -0600
Received: (qmail 13582 invoked from network); 12 Dec 2007 17:09:48 -0600
Received: from 65-115-37-3.dia.static.qwest.net (HELO ?10.2.0.15?) (tim@65.115.37.3)
  by hologistics.co.uk with ESMTPA; 12 Dec 2007 23:09:47 -0000
Message-ID: <476069AD.4010405@evdbt.com>
Date: Wed, 12 Dec 2007 16:07:25 -0700
From: Tim Gorman <tim@evdbt.com>
Organization: Evergreen Database Technologies, Inc.
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
CC: oracle-l@freelists.org
Subject: Re: partitioned tables
References: <BLU108-W11D750F8257780265E814897640@phx.gbl> <6d3967610712111625t199e5383s99c20278f022ba6b@mail.gmail.com> <475F3BC8.3000100@evdbt.com> <BLU108-W2A25F96326B489BEBF26C97650@phx.gbl>
In-Reply-To: <BLU108-W2A25F96326B489BEBF26C97650@phx.gbl>
Content-Type: text/html; charset=ISO-8859-1
X-Spam-Score: undef - evdbt.com is whitelisted.
X-CanItPRO-Stream: outgoing (inherits from default)
X-Canit-Stats-ID: Bayes signature not available
X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.168.15.6
X-archive-position: 3898
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: tim@evdbt.com
Precedence: normal
Reply-to: tim@evdbt.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Not true.<br>
<br>
But why speculate at all?&nbsp; A question like this is so easy to test
out.&nbsp; No need to ask or wonder when facts are so easy to gather...<br>
<br>
<br>
<br>
Joe Smith wrote:
<blockquote cite="mid:BLU108-W2A25F96326B489BEBF26C97650@phx.gbl"
 type="cite">
  <style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
  </style>The logical design team seems to think that the date as a
number datatype will speed up queries.&nbsp; Not true?<br>
&nbsp;<br>
thanks.<br>
  <br>
  <br>
  <blockquote>
    <hr>Date: Tue, 11 Dec 2007 18:39:20 -0700<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:tim@evdbt.com">tim@evdbt.com</a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:oracle-l@freelists.org">oracle-l@freelists.org</a><br>
Subject: Re: partitioned tables<br>
    <br>
    <meta content="Microsoft SafeHTML" name="Generator">
Why use a number to represent a date?&nbsp; There is no advantage
whatsoever, and numerous disadvantages.<br>
    <br>
...and as Gus pointed out,&nbsp; range partitioning syntax is "VALUES LESS
THAN" not "VALUES LESS THAN OR EQUAL TO"...<br>
    <br>
    <br>
Gus Spier wrote:
    <blockquote
 cite="mid:6d3967610712111625t199e5383s99c20278f022ba6b@mail.gmail.com">Of
course, it's up to you, but if you set NLS_DATE_FORMAT='YYYYMMDD', you
won't need the TXN_DATE_ID.&nbsp; I might also recommend that your partition
by range (TXN_DATE_ID) use values less than 20070201 instead of
20070131. <br>
      <br>
r,<br>
      <br>
Gus<br>
      <br>
      <div class="EC_gmail_quote">On Dec 11, 2007 4:51 PM, Joe Smith
&lt;<a moz-do-not-send="true" href="mailto:joe_dba@hotmail.com">joe_dba@hotmail.com</a>&gt;
wrote:<br>
      <blockquote class="EC_gmail_quote" style="padding-left: 1ex;">
        <div>My primary key is a composite of 3 columns, but I range
parition only on one column.<br>
&nbsp;<br>
&nbsp;It that a problem?<br>
&nbsp;<br>
        <br>
&nbsp;I know it is a date field, but we are using a number for a date, i.e.
yyyymmdd.<br>
&nbsp;<br>
&nbsp;Would I need to set up a partitioned tablespace for the index, i.e. PK?<br>
&nbsp;<br>
CREATE TABLE F_MBR_ACCT_TRANSACTION<br>
(<br>
MBR_ACCT_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTEGER&nbsp; NOT NULL ,<br>
TXN_DATE_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTEGER&nbsp; NOT NULL ,<br>
SPONSOR_TRAN_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTEGER&nbsp; NOT NULL ,<br>
TXN_DTTM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATE&nbsp; NULL , <br>
TXN_AMOUNT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NUMBER(14,2)&nbsp; NULL <br>
CONSTRAINT&nbsp; F_MBR_ACCT_TRANSACTION_PK PRIMARY KEY
(MBR_ACCT_ID,TXN_DATE_ID,SPONSOR_TRAN_ID))<br>
partion by range (TXN_DATE_ID)<br>
(partition jan_2007 values less than (20070131) tablespace
smart_part_jan_2007, <br>
&nbsp;partition feb_2007 values less than (20070228) tablespace
smart_part_feb_2007,<br>
&nbsp;.<br>
&nbsp;.<br>
&nbsp;.<br>
&nbsp;partition jan_2007 values less than (20071231) tablespace
smart_part_dec_2007);<br>
&nbsp;<br>
&nbsp;<br>
        <br>
        <hr>
Share life as it happens with the new Windows Live. <a
 moz-do-not-send="true"
 href="http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007"
 target="_blank">Share now!</a></div>
      </blockquote>
      </div>
      <br>
    </blockquote>
-- <a class="moz-txt-link-freetext" href="http://www.freelists.org/webpage/oracle-l">http://www.freelists.org/webpage/oracle-l</a> </blockquote>
  <br>
  <hr>The best games are on Xbox 360. Click here for a special offer on
an Xbox 360 Console. <a moz-do-not-send="true"
 href="http://www.xbox.com/en-US/hardware/wheretobuy/" target="_new">Get
it now!</a></blockquote>
</body>
</html>
--
http://www.freelists.org/webpage/oracle-l


