>>You ask for wrong thing. Instead of ask for a non standard feature that
>>no DBMS made, and that completely changes SQL, you'd better ask for
>>optimized PSQL execution.

>>PSQL engine has none optimization currently.
>>Adriano

If this change something in string allocation on every change, than maybe it is 
the way.
But this is only one point of this request.
Other point is simple string manipulation.

Compare:
--------------------------------------------------------------------------------------
VAR_S = VAR_A[5] || VAR_A[3] || VAR_A[1];

Vs

VAR_S = SUBSTRING(VAR_A FROM 5 FOR 1) || SUBSTRING(VAR_A FROM 3 FOR 1) || 
SUBSTRING(VAR_A FROM 1 FOR 1);

--------------------------------------------------------------------------------------

Or better sample

VAR_S[5] = VAR_A[3];
VAR_S[3] = VAR_A[5];

Vs

VAR_S = SUBSTRING(VAR_S FROM 1 FOR 2) || SUBSTRING(VAR_A FROM 5 FOR 1) || 
SUBSTRING(VAR_S FROM 4 FOR 1) || SUBSTRING(VAR_A FROM 3 FOR 1) || 
SUBSTRING(VAR_S FROM 6);

 
--------------------------------------------------------------------------------------


And i only show some simple sample. 
How many times you can put wrong calculation in above sample? 
Especially in the second one?

Regards,
Karol Bieniaszewski

Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to