otmfaqForumsBlogsRegister
FAQMembers ListCalendarToday's PostsSearch


 Subscribe Blogs:RSS
 Subscribe Forums:RSS
OTMFAQ Home
OTMFAQ Blogs
OTMFAQ Forums
OTMFAQ Tutorials

OTM SIG
MavenWire


Performance, Scalability and HA Optimizing the performance of OTM / G-Log, configuring Scalability (SCA) and maintaining High Availability.

Tags: , ,

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old March 14th, 2008, 21:25
Junior Member
 
Join Date: Mar 2007
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
prasad is on a distinguished road
UTC.GET_LOCAL_DATE SQL Performance

We are using utc.get_local_date function very frequently. Is there a better way to get the local date? This function call is taking a long time execute.

For example.

to_char(ORD.LATE_PICKUP_DATE,'DD-MON-YYYY') = '14-MAR-2008' (ORD is order release)

This condition in the where clause scans through all the rows in the order release ID.
How can I avoid the complete table scan?

Thanks,
Prasad.
__________________
Thanks,
Prasad.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old March 15th, 2008, 09:53
Member
 
Join Date: Mar 2007
Location: Bedfordshire England
Posts: 48
Thanks: 3
Thanked 9 Times in 8 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
cunninghamg is on a distinguished road
Send a message via AIM to cunninghamg Send a message via MSN to cunninghamg Send a message via Skype™ to cunninghamg
Re: UTC.GET_LOCAL_DATE SQL Performance

prasad

Its not the utc.get_local_date that is causing the full table scan - its the query.

If you look for a particular date in the Order_release table, it will scan all entries unless you add an index on the field being searched.

Adding further filtering criteria would help reduce the number of records to scan (if available).

Cheers
Gary
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to cunninghamg For This Useful Post:
chrisplough (March 15th, 2008)
  #3 (permalink)  
Old March 15th, 2008, 21:40
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 816
Blog Entries: 7
Thanks: 53
Thanked 199 Times in 121 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10
chrisplough has a spectacular aura aboutchrisplough has a spectacular aura aboutchrisplough has a spectacular aura about
Send a message via AIM to chrisplough
Re: UTC.GET_LOCAL_DATE SQL Performance

I definitely agree with Gary on this one. All queries in the system should be qualified with additional criteria (especially date criteria) in order to avoid full table scans. Many times the screens are modified, so that a date criteria is automatically includes, such as only returning results within the last 60 or 90 days.

--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old March 16th, 2008, 22:16
Junior Member
 
Join Date: Mar 2007
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
prasad is on a distinguished road
Re: UTC.GET_LOCAL_DATE SQL Performance

Gary & Chris.

Thank You for you hint. By narrowing the query, the performance increased significantly.

regards,
Prasad.
__________________
Thanks,
Prasad.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old June 5th, 2008, 22:26
Member
 
Join Date: May 2007
Location: India
Posts: 69
Thanks: 1
Thanked 2 Times in 2 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 2
sknmail@rediffmail.com is on a distinguished road
Send a message via Yahoo to sknmail@rediffmail.com
Re: UTC.GET_LOCAL_DATE SQL Performance

Hi Chris,

We recently migrated our Devl environment from 4.5 to 5.5 CU#4 RU#1.

We could find when we run the the sql statement on migrated 5.5 Database
select UTC.GET_LOCAL_DATE (SYSDATE, NULL) from dual; throws an exception "ORA-20000: Undefined time zone for location".

However this same used to run on 4.5 Database. Now we have a bunch of reports which uses this function and all those reports are now throwing this exception. We do have raised a SR with Oracle on this, however still research is going on.

I will keep you update on this on receipt of a workaround.

Regards,
Suresh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to sknmail@rediffmail.com For This Useful Post:
chrisplough (June 5th, 2008)
  #6 (permalink)  
Old June 5th, 2008, 23:59
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 816
Blog Entries: 7
Thanks: 53
Thanked 199 Times in 121 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10
chrisplough has a spectacular aura aboutchrisplough has a spectacular aura aboutchrisplough has a spectacular aura about
Send a message via AIM to chrisplough
Re: UTC.GET_LOCAL_DATE SQL Performance

Suresh,

Thank you. I haven't run into this issue myself, but will shop it around some of my contacts to see if I can help find a solution. Otherwise, I appreciate you keeping us updated.

--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old June 6th, 2008, 09:02
Member
 
Join Date: Mar 2007
Location: Bedfordshire England
Posts: 48
Thanks: 3
Thanked 9 Times in 8 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
cunninghamg is on a distinguished road
Send a message via AIM to cunninghamg Send a message via MSN to cunninghamg Send a message via Skype™ to cunninghamg
Re: UTC.GET_LOCAL_DATE SQL Performance

Hi

So far as I recall the utc.get_local_date function is used to determine the timezone of the Location being passed in.
In you case - no location is being passed in - hence the error.

Did you expect this function to use your local PC timezone setting?
If so - I don't see this is possible.

Gary
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old June 6th, 2008, 13:55
Junior Member
 
Join Date: Dec 2006
Posts: 17
Thanks: 1
Thanked 2 Times in 2 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
sprabhakar is on a distinguished road
Send a message via AIM to sprabhakar
Smile Re: UTC.GET_LOCAL_DATE SQL Performance

The reason you are getting is error is that Oracle have modified the UTC package.
Prior to 55, the piece of code was coded as

if ( v_time_zone_gid is null) then
return local_date;
end if;

where local_date returned the system date from the database server. Whereas in 55 the above piece of code has been modified as

if ( v_time_zone_gid is null) then
raise_application_error(-20000, 'Undefined time zone for location'|| v_location_gid);
end if;

Thus making it mandatory to pass a location gid to get the local date from the server. A simple workaround to get this working without modifiying any of your reports would be to add a location with LOCATION_GID value as 'NULL' and the TIME_ZONE_GID with a value of your local timezone.

Alternatively, you can also use the below query to get local date in GMT.

select vpd.gmt_sysdate from dual

Please update if this works or I will suggest a few other options.

Regards,
Prabhakar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance Benchmarks ashwinrrao Performance, Scalability and HA 7 January 21st, 2008 13:12
OTM 5.5: VPD Query Performance - Improvements ianlo Performance, Scalability and HA 10 December 4th, 2007 00:24
Performance issue integration bob_romijn Performance, Scalability and HA 5 November 28th, 2007 11:11
Rational Performance Tester Kristof Stevens Performance, Scalability and HA 1 September 10th, 2007 09:07
Optimizing GC3 v5.0 Performance - Part 1 chrisplough Performance, Scalability and HA 6 August 30th, 2007 18:57



All times are GMT. The time now is 11:43.
Copyright © 2008, Open Book Solutions LLC. All rights reserved.

Sponsored by MavenWire - MavenWire.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37