I fixed the update statement with

"UPDATE ... where PRIMKEY= GEN_ID(gen_primkey_counter,0)"
and execution fell from 20s to 0,4. :-)

Now a final question, what would  GEN_ID(gen_primkey_counter,0) return,
when I delete the last n entries of the table?

It's fun to implement FB with such a great and instant support! Thanks!

On Tue, Feb 4, 2020 at 1:12 PM Matthias Winkler <[email protected]> wrote:

> Hello SD,
>
> YES!!!! That kind of thing is what I was looking for, I guess.
> Thanks
>
> On Tue, Feb 4, 2020 at 12:52 PM Dimitry Sibiryakov [email protected]
> [firebird-support] <[email protected]> wrote:
>
>> 04.02.2020 12:47, Matthias Winkler [email protected] [firebird-support]
>> wrote:
>> > But I need to deal with a heap of old code and re-designing
>> > it, is not a real option :-)
>>
>>    Still you can use "update or insert ... matching gen_id(..., 0)"
>> instead.
>>
>>
>> --
>>    WBR, SD.
>>
>>
>> ------------------------------------
>>
>> ------------------------------------
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>> Visit http://www.firebirdsql.org and click the Documentation item
>> on the main (top) menu.  Try FAQ and other links from the left-side menu
>> there.
>>
>> Also search the knowledgebases at
>> http://www.ibphoenix.com/resources/documents/
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> ------------------------------------
>>
>> Yahoo Groups Links
>>
>>
>>
>>

Reply via email to