[FAQ] How Table Method Similar/Differ to StoredProcedures

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 19 16:51:33 CDT 2007


On 20/10/07 12:25 AM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

Hi Bart,

> On 19-okt-07, at 09:30, Ruslan Zasukhin wrote:
> 
>> 3) Methods this is SIMPLE EXPRESSION (yes based on SQL rules)
>>     that calculates SCALAR value for a Method,
>>     using VALUES OF single CURRENT record of table.
> 
> Could you clarify this:
> 
> If a method is indexed I always assumed this would get a "stored"
> value in the methodfield, so in this case it would not only b
> calculated for the CURRENT record, but for all records.

> As I understand it a method field can only use values from the
> current record to calculated its value.

YES, this is about I try to say above.

Method can only use values from the current record of the same table.
    You cannot go to other record.
    You cannot get values from other table ...
        Except as using operator ->

> The value can (or cannot,  depending on indexed or not) be stored inside the
> column for all  records( when indexed) or is recalculated every time a record
> is  "touched" (when not indexed)
> 
> Do I understand this correctly?

Not exactly.

Calculated field DO NOT store calculated value to disk. NEVER.

If it is indexed, then yes index file exists on disk, and it store that
calculated valued for all records of table.

You can think about this as:

        exist field f1

    exists FEW index files based on this f1.

    may be exists another few index files based on f1 and other fields.


This is analog of e.g. FoxPro [CREATE INDEX by EXPR]...
    mySQL do not have such power.
    they can only CREATE INDEX f1, f2




-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list