From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.22.65 with SMTP id b1mr6375087obf.10.1399670084182; Fri, 09 May 2014 14:14:44 -0700 (PDT) X-Received: by 10.140.102.65 with SMTP id v59mr191qge.42.1399670084149; Fri, 09 May 2014 14:14:44 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!r10no2533554igi.0!news-out.google.com!dz10ni35687qab.1!nntp.google.com!ih12no2013153qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 9 May 2014 14:14:43 -0700 (PDT) In-Reply-To: <907541b2-62f6-449e-87bf-7706b1457922@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=46.195.148.91; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9 NNTP-Posting-Host: 46.195.148.91 References: <304f2721-64bc-4959-a7e8-0cc29cf5204f@googlegroups.com> <49354f93-75ef-4b1c-90a3-0fdedc7e36f3@googlegroups.com> <907541b2-62f6-449e-87bf-7706b1457922@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada and PL/pgSQL ? From: =?ISO-8859-1?Q?bj=F6rn_lundin?= Injection-Date: Fri, 09 May 2014 21:14:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:19767 Date: 2014-05-09T14:14:43-07:00 List-Id: Den fredagen den 9:e maj 2014 kl. 21:59:30 UTC+2 skrev sdale...@gmail.com: >=20 >> I think you are bitten by mysql performance. >=20 > No there are similar results when exporting the schema from MySQL to >Pos= tgres. The fact is there is only so much you can logically do in a single = >query. You can index and join and filter and sort etc. But when push co= mes >to shove you need to implement business logic somewhere. Yes. And for me, the correct place is in a separate layer - in Ada. That also makes things a lot easier if you want to change db-engine again. We are into the 5th db since the late 80's (Mimer, Oracle RDB, Oracle, Sql-server, Postgresql) =20 > The tables are simple and not at all complex. There are two tables invol= ved > a transactions table and an order table. Given that and=20 > The minimum execution time for an order was 30s. > However it was climbing as high as 5mins.=20 makes me wonder about the number of records you have in the db. With these timings, it must be in the tens or hundreds of million records? explain analyze of the queries after a vacuumdb --analyze would be interest= ing to see. But that is for Postgres performance mail list, not for this one. Executing logic will take place in a postgres process. Having your logic i c or ada executing locally on that server - does that make a difference in the figures? =20 > The transactions table reflect credits/debits against accounts, whereas t= he orders table represents a literal "filled out order form". >=20 > It can't really be simplified much more than that. No. And that is why I am curios about the amount of data. The timings just seems very strange. /Bj=F6rn