Re: jdbc question

From: Sudsy (bitbucket44_at_hotmail.com)
Date: 12/30/04


Date: Thu, 30 Dec 2004 11:45:54 -0500

Thomas Kellerer wrote:
<snip>
> Without specific requirements there is no way telling which version is
> better. If this is e.g. a data load that is performed during the night,
> the the solution is absolutely valid. If this is a use case with highly
> partioned data (each user edits different records) then it's valid as
> well, if the situation is a highly dynamic entry system where the
> situation that you sketched is very likely to happen, then obviously
> this is not a good idea. On the other hand: if you expect more updates
> then inserts to be successful, the overall performance would be *much*
> better this way because the index lookup for the primary key is only
> needed once for the update but twice for the inser/update combo.
>
> I was simply offering a different solution. If it's feasible for the
> situation of the OP is up to him (and he did not give information to us
> in order to judge that)

Thomas,
    You raise an excellent point. You can't optimize your approach unless
you know how the database is going to be used. In some situations you're
going to have a lot of inserts (e-commerce, for example) while in others
you're only performing updates (e.g. banking).
    Goodness knows, if you're doing a batch load on some databases then
you're better off dropping the indices, performing the load, then
recreating the indices. It takes less time than updating the indices
when loading records individually.
    Which only goes to show that JDBC programmers should be familiar
with underlying database concepts. Thanks for sharing your ideas!



Relevant Pages

  • Re: Generating one table with a terabyte of data
    ... I didn't know we could split a database file group over multiple HDs. ... > Run perfmon counters to a log and analyze them after a bulk load. ... Another thing is to split the updates across file sets. ... >> loading of daily data in the fastest time. ...
    (microsoft.public.sqlserver.dts)
  • Re: ORACLE RAC and ORACLE Standby
    ... standby is better for disaster recovery and RAC is ... with taking any downtime on your primary database instance. ... The standby database provides a local or off-site recovery instance. ... Load balancing capabilities of RAC include ...
    (comp.databases.oracle.server)
  • Re: Poser? What happens to empty pages in a database unload/load?
    ... At my company, several time each weekend, a database is unloaded at ... squeezed out of the load. ... I unload the table and load it back and now all those empty pages are ... Art S. Kagel ...
    (comp.databases.informix)
  • Re: Too many objects loaded at the same time and cause OutOfMemory exception.
    ... Stored procedures won't necessarily help here, ... allow the database to pre-plan the implementation. ... There should be a way to load objects without having to load all ... each student has 5 lessons. ...
    (microsoft.public.dotnet.framework.aspnet)
  • VM in 2.6 doing a worse job of caching than 2.4?
    ... day by a proprietary database system. ... I recently started evaluating the 2.6 kernel for these machines. ... and see's CPU idle of 30-35%. ... Theoretically, they both should receive similar traffic, though the load ...
    (comp.os.linux.development.system)