Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #36041

Re: Scaling java app

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.java.programmer
Subject Re: Scaling java app
Date 2016-12-02 22:28 -0500
Organization A noiseless patient Spider
Message-ID <o1te19$m62$1@jstuckle.eternal-september.org> (permalink)
References (18 earlier) <o1sepg$jt7$1@dont-email.me> <o1skn9$fqi$1@jstuckle.eternal-september.org> <o1su8q$5v6$1@dont-email.me> <o1t3bk$4h3$1@jstuckle.eternal-september.org> <o1tdhg$l65$1@gioia.aioe.org>

Show all headers | View raw


On 12/2/2016 10:18 PM, Arne Vajhøj wrote:
> On 12/2/2016 7:25 PM, Jerry Stuckle wrote:
>> On 12/2/2016 5:57 PM, Martin Gregorie wrote:
>>> On Fri, 02 Dec 2016 15:16:08 -0500, Jerry Stuckle wrote:
>>>> On 12/2/2016 1:33 PM, Martin Gregorie wrote:
>>>> Yes, which is all dynamic SQL.  It also has an extra layer of code
>>>> between the application and the database-specific libraries.  Something
>>>> COBOL doesn't have.
>>>>
>>> Not necessarily: in a modern RDBMS the optimisation layer is inside the
>>> RDBMS, so the ODBC driver may be little more than an API translator and,
>>> in some cases a field content reformatter.
>>
>> Yes, and the optimization must be performed with every call (perhaps it
>> can be cached for a connection, but that's all).
> 
> Some databases cache across connections.
> 
> But even for those that don't it does not matter in most cases.
>

You're right.  It doesn't matter when you're the only thing running on a
PC.  When you have hundreds of programs running on a mainframe, it
matters very much.

> Most heavy database usage in Java uses a connection that also pools
> prepared statements.
> 

So?  Prepared statements are not static SQL.

>>> Last but not least, if you use prepared SQL statements you guarantee
>>> that
>>> the statement has its optimised strategy calculated and stored when the
>>> prepared statement is created (usually during program initialisation)
>>> and
>>> so the per-query overheads incurred when your queries are submitted as a
>>> string containing SQL syntax plus the data values vanish: the prepared
>>> query was optimised once at declaration and can be reused many times
>>> without further optimisation. Finally, prepared statements provide
>>> protection against SQL exploits because the prepared SQL statement only
>>> contains place-holders for data values. This means that spurious
>>> statement terminators and other attempts to inject injurious SQL
>>> statements will be treated purely as data: the prepared statement may
>>> reject the 'value strings' given to it but can't and won't try to
>>> interpret them as SQL commands.
>>
>> Yes, and this has to be done with *EVERY* call.
> 
> No. Typical execution plans get cached also with parameters.
> 

But are not stored permanently in the database, and cannot be updated on
command.

>> Additionally, prepared statements are only one way of protecting against
>> SQL exploits.  Proper handling of the data will do it, even without
>> prepared statements.
> 
> That usually leads to security disasters.
> 

Not when you know what you're doing, it doesn't.  But it is a security
disaster for incompetent programmers.

>>> I don't think you understand ODBC or have looked at the list of
>>> supported
>>> databases. ODBC and JDBC (which can also use ODBC DB drivers) support
>>> almost any database you're likely to use as well as a selection of 4GL
>>> filing systems and indexed files - if anybody has written and
>>> published a
>>> driver for the DB or filing system it is supported: you can download it
>>> and its documentation and used it to access its target data store.
>>
>> I understand it, all right.  I've been using it since it came out in
>> what - Windows 3.1?  Something like that, anyway.  And JDBC since early
>> days of Java.
>>
>> But I've also used static SQL, and understand the difference and the
>> advantages and disadvantages of each.  Both ODBC and JDBC add an extra
>> layer of processing, slowing down access.
> 
> Hmmm.
> 
> If you really had been using them then you should know that ODBC
> is indeed dispatching, but that JDBC is based on polymorphism, so
> no extra layer - or maybe more correctly: not necessarily
> an extra layer - type 2 JDBC drivers can be considered an extra
> layer. But not so important as most database vendors have
> type 4 JDBC drivers available today.
> 
> Arne
> 

Still another layer involved, and not as efficient as static SQL.

But of course, you're an expert on static SQL also, even though you've
never used it - and obviously don't even understand it.  ROFLMAO!

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-21 11:06 -0600
  Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-11-21 19:48 +0000
    Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-21 12:33 -0800
      Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-21 18:23 -0600
        Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-21 21:22 -0500
          Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 21:25 -0500
            Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-21 22:29 -0500
              Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 22:41 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-22 10:51 -0500
          Re: Scaling java app a.laforgia@gmail.com - 2016-11-23 04:58 -0800
            Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 05:18 -0800
              Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 09:52 -0500
                Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 07:51 -0800
            Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 09:46 -0500
              Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 08:07 -0800
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 12:10 -0500
                Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 10:39 -0800
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 14:57 -0500
            Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-23 15:04 -0500
              Re: Scaling java app a.laforgia@gmail.com - 2016-11-24 02:01 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-24 09:10 -0500
                Re: Scaling java app a.laforgia@gmail.com - 2016-11-25 03:48 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-25 09:58 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:22 -0500
              Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:34 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-26 00:01 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-26 09:05 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-26 09:52 -0500
  Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 19:46 -0500
    Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-21 21:12 -0600
      Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 22:44 -0500
        Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-22 09:56 -0600
          Re: Scaling java app Silvio <silvio@internet.com> - 2016-11-22 20:07 +0100
            Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-22 18:00 -0600
              Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-22 19:35 -0600
              Re: Scaling java app Silvio <silvio@internet.com> - 2016-11-24 00:51 +0100
          Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 10:26 -0500
            Re: Scaling java app Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-11-23 15:54 -0500
              Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 20:46 -0500
          Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 12:00 -0500
            Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-23 19:53 -0600
              Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 21:21 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 21:34 -0500
                Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-28 05:06 -0800
                Re: Scaling java app Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2016-11-24 20:45 +0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-24 09:12 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:32 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-26 00:05 -0500
                Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-11-26 15:24 +0000
                Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-28 05:08 -0800
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-28 19:51 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-28 21:18 -0500
                Re: Scaling java app lewbloch@gmail.com - 2016-11-29 13:50 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-29 16:53 -0500
                Re: Scaling java app lewbloch@gmail.com - 2016-12-01 13:27 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-01 16:45 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-01 22:07 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 10:35 -0500
                Re: Scaling java app Gene Wirchenko <genew@telus.net> - 2016-12-02 08:53 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 15:05 -0500
                Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 20:25 +0000
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 16:20 -0500
                Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 18:33 +0000
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 15:16 -0500
                Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 22:57 +0000
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 19:25 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:18 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 22:28 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:36 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-03 11:27 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:05 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 22:30 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:41 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-03 11:29 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:00 -0500
                Re: Scaling java app lewbloch@gmail.com - 2016-12-02 11:40 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 15:17 -0500
                Re: Scaling java app lewbloch@gmail.com - 2016-12-02 16:26 -0800
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 20:46 -0500
                Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-12-02 12:44 -0800
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 21:57 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 22:40 -0500
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:51 -0500
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-03 11:42 -0500
                Re: Scaling java app Andreas Leitgeb <avl@logic.at> - 2016-12-02 15:43 +0000
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 21:19 -0500
                Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 10:28 +0000
                Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 10:37 -0500
                Re: Scaling java app Gene Wirchenko <genew@telus.net> - 2016-12-02 09:00 -0800
                Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-12-01 13:50 -0800
                Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:30 -0500
  Re: Scaling java app Roedy Green <inquiry@mindprod.com> - 2016-11-27 16:42 -0800

csiph-web