Deutsch English Français Italiano |
<vpqm2d$39d65$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: alt.folklore.computers,comp.os.linux.misc Subject: Re: The joy of FORTRAN Date: Thu, 27 Feb 2025 21:39:25 -0000 (UTC) Organization: A noiseless patient Spider Lines: 28 Message-ID: <vpqm2d$39d65$1@dont-email.me> References: <5mqdnZuGq4lgwm_7nZ2dnZfqnPSdnZ2d@earthlink.com> <vd5195$edas$1@dont-email.me> <59CJO.19674$MoU3.15170@fx36.iad> <vd6vto$r0so$1@dont-email.me> <iJEJO.198176$kxD8.81657@fx11.iad> <3hOdnWpQ649QMGr7nZ2dnZfqnPidnZ2d@earthlink.com> <vd8doi$15q07$1@dont-email.me> <vd8eg7$15v1j$2@dont-email.me> <cxicnVzg_cn_eGX7nZ2dnZfqnPadnZ2d@earthlink.com> <vdapbn$1kp35$5@dont-email.me> <lltpunF4fseU2@mid.individual.net> <1smdnSjX3YoxgWf7nZ2dnZfqn_idnZ2d@earthlink.com> <llv30aFa6uvU3@mid.individual.net> <vde4b8$268qv$22@dont-email.me> <1396870532.749421730.052473.peter_flass-yahoo.com@news.eternal-september.org> <wrapper-20241001111737@ram.dialup.fu-berlin.de> <vpl5uk$hhk$3@reader1.panix.com> <c4acndn4jJXKwCP6nZ2dnZfqnPSdnZ2d@giganews.com> <1214951717.762291306.657281.peter_flass-yahoo.com@news.eternal-september.org> <gIUvP.1415795$21T3.138928@fx18.iad> <vpp6b0$31cet$2@dont-email.me> <5DWdnXyIYo7er136nZ2dnZfqnPednZ2d@giganews.com> <vppkbv$33b82$6@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 27 Feb 2025 22:39:26 +0100 (CET) Injection-Info: dont-email.me; posting-host="5663112188f1f002c68c712720ef74d4"; logging-data="3454149"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++tj0+btjbDFn9LNBMwBMu" User-Agent: Pan/0.162 (Pokrosvk) Cancel-Lock: sha1:w2jg3xaVLxhYSRtW7X1L1VNprjg= Bytes: 3313 On Thu, 27 Feb 2025 12:04:15 +0000, The Natural Philosopher wrote: >> Ummmmmm ... SQL from *anything* isn't especially "pleasant' 🙂 > > It is if you restrict yourself to just a few library bits that work > [well] I think the most complex query I’ve done is a 7-way table join. > I found out early that MySQL was really really good at very simple > queries but was abominably slow at processing complex ones and it was > better to not try and write the One True SQL statement, but several > simple ones and to manipulate the data in C afterwards. Quite the opposite. One of my jobs is to maintain and continue development of a system written in PHP for a client by some previous developer who only knew ... PHP. One of the reports it generates is a list of hours worked over a range of dates. The original code did a separate query for each date in the range. So the longer the interval, the slower it went. (E.g. a query covering 6 months could get pretty painful.) I replaced that code with a single query over the entire date range, where my code looped over the result records and grouped them accordingly for output. Result: much faster results -- even a query covering 6 months would appear in just a few seconds. Moral: the more information you give the query optimizer, the more efficiently you will get results.