sqlplus vs pl/sql - Page 2
DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: sqlplus vs pl/sql

  1. #11
    Join Date
    Apr 2003
    Posts
    353
    Originally posted by kris123
    By the way would the logic be the same if i use
    trunc(departure_date) as against trunc(departure_date+0)? Why add 0
    thanks
    Pls try and feedback.
    I have done more than fifty testing, when I had this problem, for me also the data is huge.

  2. #12
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    How are the partitions defined? I'm thinking that is must be range based, and that the predicate departure_date>to_date('31-DEC-2004','DD-MON-YYYY') would actually be better as departure_date>=TO_DATE('01-JAN-2005','DD-MON-YYYY')

    This would be because your current predicate is not fully eliminating the possibility of there being some results required from the 2004 partition. How does that sound?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #13
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    Hi dear, I guess thats a better option
    The table is partitioned by range like...
    TABLE DEPARTURE_ALL
    PARTITION BY RANGE ("EXIT_DATE" )
    (PARTITION "DEPART1993" VALUES LESS THAN (TO_DATE(' 1994-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PARTITION "DEPART1994" VALUES LESS THAN (TO_DATE(' 1995-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PARTITION "DEPART1995" VALUES LESS THAN (TO_DATE(' 1996-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    ...etc

  4. #14
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    Originally posted by engiri
    Pls try and feedback.
    I have done more than fifty testing, when I had this problem, for me also the data is huge.
    Yes dear, i guess adding 0 does the trick too. I tested
    trunc(departure_date) only but after sometime it hanged, i dont know
    if its just a coincidence only but when i change it to
    trunc(departure_date+0) it runs smoothly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width