PreparedStatement and SYSDATE Performance Tuning
- From: johnhurt@xxxxxxxxx
- Date: 22 Aug 2005 11:38:53 -0700
Hi,
I have a quick question. Which is faster as a preparedstatement in a
loop (ie, doesn't get reparsed)? Does anyone have a definitive answer
and not a hunch like me?
1) insert into aaa values (?,?,SYSDATE)
2) insert into aaa values (?,?,?) where 3rd ? is a java.util.Date
Regarding re-parsing, would SYSDATE be considered a literal or a
function-return-value and therefore force a similar statement to be
re-parsed?
Lets say that Oracle is very smart, and doesn't reparse if SYSDATE is
the only function or part of a PreparedStatement that changes. In that
case would...
insert into aaa values (?,?,TRUNC(SYSDATE))
be re-parsed or not?
.
- Follow-Ups:
- Re: PreparedStatement and SYSDATE Performance Tuning
- From: Bill Karwin
- Re: PreparedStatement and SYSDATE Performance Tuning
- From: Joan
- Re: PreparedStatement and SYSDATE Performance Tuning
- Prev by Date: Events in jdbTable and TableScrollPane
- Next by Date: Re: PreparedStatement and SYSDATE Performance Tuning
- Previous by thread: Events in jdbTable and TableScrollPane
- Next by thread: Re: PreparedStatement and SYSDATE Performance Tuning
- Index(es):