🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #96

Re: can I use sum with computed by

#96
From: Maxim Shiryaev
Date: Thu, 29 May 2008 14:16
23 lines
1473 bytes
Hi.

You can but it will be very inefficeint.

It's better to create triggers on detail table and update regular (not
computed) fields in the master. De-normalisation though...

Calculated fields will be better only if you have very strange read/write
ratio (in favour of write) for a usage senario of your database.


Maxim.

"Isaac" <no@no.com> ???????/???????? ? ???????? ?????????:
news:483c6824@newsgroups.borland.com...
> Hello,
> I wonder if I can use computed by to sum all detail records or is it
> only limited to the current table ?.
>
> ex
> select sum(f) from table where f2 = value
>
> Thanks
Technical Details
Message-ID: <483ebabf@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <483c6824@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,f81bba07595296f5
X-Google-Attributes: gid114a0e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Maxim Shiryaev" <MaximShiryaev@gmail.com>
Newsgroups: borland.public.interbase.sql
References: <483c6824@newsgroups.borland.com>
Subject: Re: can I use sum with computed by
Date: Thu, 29 May 2008 18:16:16 +0400
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.234.197.62
Message-ID: <483ebabf@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1212070591 213.234.197.62 (29 May 2008 07:16:31 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail