• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Database update and insert optimizations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Database update and insert optimizations?


  • Subject: Re: Database update and insert optimizations?
  • From: Brendan Duddridge <email@hidden>
  • Date: Thu, 27 Jul 2006 18:00:19 -0600

Further to my post, here's an interesting article I found about why using Prepared Statements are good and how to use them properly:

http://www.theserverside.com/tt/articles/article.tss?l=Prepared-Statments


Thanks,


____________________________________________________________________
Brendan Duddridge | CTO | 403-277-5591 x24 |  email@hidden

ClickSpace Interactive Inc.
Suite L100, 239 - 10th Ave. SE
Calgary, AB  T2G 0V9

http://www.clickspace.com 

On Jul 27, 2006, at 5:52 PM, Brendan Duddridge wrote:

Hi,

Has anyone done any work to optimize the way EOF saves to the database?

To be more specific, I was wondering if it would be possible to coerce EOF to use prepared statements instead of individual statements for each operation?

So instead of:

INSERT INTO table1 (col1, col2) values (1,2);
INSERT INTO table1 (col1, col2) values (3,4);

each executed as independent statements within a transaction,

EOF could issue:

PreparedStatement insertOp = con.prepareStatement("INSERT INTO table1 (col1, col2) values (?, ?)");

and then pass all the values using lower level jdbc:

insertOp.setInt(1, 1);
insertOp.setInt(1, 2);
etc...

I'm not sure of the exact jdbc syntax involved in doing this correctly. I just found a few notes about prepared statements on the Net.

Has something like this been done or is it even possible?

I would think this king of approach would make inserts, updates, and deletes faster.

Thanks,


____________________________________________________________________
Brendan Duddridge | CTO | 403-277-5591 x24 |  email@hidden

ClickSpace Interactive Inc.
Suite L100, 239 - 10th Ave. SE
Calgary, AB  T2G 0V9

http://www.clickspace.com 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Database update and insert optimizations? (From: Brendan Duddridge <email@hidden>)

  • Prev by Date: Database update and insert optimizations?
  • Next by Date: Re: Direct Action vs. Component Action...
  • Previous by thread: Database update and insert optimizations?
  • Next by thread: Compiling Sub Projects with in a Project - Regarding
  • Index(es):
    • Date
    • Thread