[thesite] Tip Harvester question (was: [***] Formatting tips )

Dean Mah dsmah at home.com
Sat Mar 31 21:51:44 CST 2001


Warden, Matt writes:

> You mean like prepared/parameterized statements?
> 
> select blah from thetips where evolt='sexy' and insertdate=? and whatever=?
> 
> and then the above is sent to the database and, through the language, you can
> set those two parameters. Is that what you're talking about? Or are you
> talking about something different. If you are, then is that better than the
> prepared statement option? The query is run through the optimizer prior to
> batch loading/selecting/other so the database path is already figured out.
> Then, it doesn't have to go through the optimizer every time.

Yes, this is what I am talking about.  You still need to prepare the
query, however.  Then bind and then execute.  Oracle caches queries so
that they can be used between sessions.  So a Perl script that gets
called repeatedly, e.g., a login script that queries the database for
account information, can reap performance benefits because the queries
are cached in Oracle's System Global Area (SGA).


> That's something I've never thought of. Can it be done through the
> language (not sure if that would be considered SQL). IOW, could you
> turn off autocommit for the duration of the loading and then turn
> them back on after you have committed everything and completed
> loading?

AutoCommit is usually set at the application level through your
interface library and is set for the duration of execution.  I don't
think that the database sets this at all.


Dean







More information about the thesite mailing list