Subject | Re: Insert performance |
---|---|
Author | Roman Rokytskyy |
Post date | 2002-11-22T11:24Z |
Hi,
be like this:
- "Hi, I'm client 123, TxID 234";
- "Hi, server 345 at your service";
- "Please, insert me row into table T1 with values V1, V2, V3";
- "Done.";
- "How many rows you inserted?";
- "1, as it was requested.";
- "Thanks a lot!";
- "You're wellcome";
As you see, you can remove part of conversation asking the number of
rows inserted.
If something goes wrong with server (server died, network died, etc.)
conversation would be:
- "Hi, I'm client 123, TxID 234";
- "Hi, server 345 at your service";
- "Please, insert me row into table T1 with values V1, V2, V3";
- <timeout/exception>
- "HELP, server died", throw an SQLException.
you're on the safe side. No client can make any modification that
will bring database into incorrect state. So, client simply inserts,
updates, deletes and relies on the server to handle this correctly.
DBA for each database server you have (Oracle, DB2, MS SQL, Firebird,
PostgreSQL, etc.). But you will be surprised how can you boost the
performance of your application.
Best regards,
Roman Rokytskyy
> I really do not care about the count. Although checking the countThe highlevel description of the executeUpdate("INSERT ....") would
> is the only way I know of at the moment to verify that my trans
> succeeded or failed.
be like this:
- "Hi, I'm client 123, TxID 234";
- "Hi, server 345 at your service";
- "Please, insert me row into table T1 with values V1, V2, V3";
- "Done.";
- "How many rows you inserted?";
- "1, as it was requested.";
- "Thanks a lot!";
- "You're wellcome";
As you see, you can remove part of conversation asking the number of
rows inserted.
If something goes wrong with server (server died, network died, etc.)
conversation would be:
- "Hi, I'm client 123, TxID 234";
- "Hi, server 345 at your service";
- "Please, insert me row into table T1 with values V1, V2, V3";
- <timeout/exception>
- "HELP, server died", throw an SQLException.
> > However, what is better - integrity constraints onIf your integrity constraints do not allow incorrect database state,
> > the server or update count on the client?
> What do you mean, I have integrity constraints like not null, and
> other checks. What else do I need on the server side.
>
> I just need to know on the client side, not the server side.
you're on the safe side. No client can make any modification that
will bring database into incorrect state. So, client simply inserts,
updates, deletes and relies on the server to handle this correctly.
> > Is it good? I doubt...It is definitelly good to use built in features. Yes, you will need a
> Are you saying it's not good to use the built in features. Or not
> good to not?
DBA for each database server you have (Oracle, DB2, MS SQL, Firebird,
PostgreSQL, etc.). But you will be surprised how can you boost the
performance of your application.
Best regards,
Roman Rokytskyy