On 2020-01-24 13:29, Matthias Winkler spmm...@gmail.com 
[firebird-support] wrote:
> Hello,
> 
> With Firebird 2.1.7 this statement freezes my firebird server
> completely. Firebird will
> take 100% CPU.
> 
>> select first(8) ID from TBL_TEST
>> where ID not in (select first(2) ID from TBL_TEST order by ID desc)
>> order by ID desc
> 
> The used table has about 18`000 entries.
> 
>  If I remove ONE of the order statements the query runs fine and takes
> around 3s.
> 
> Can somebody explain what execution plan is made for this statement
> and
> why it might sent my server into 100% CPU?
> 
> Note: The statement here is simplified from my real usecase. The
> statement itself might
> not look useful. But that is not the point.

Firebird 2.1 has been end-of-life for more than five years. Can you 
reproduce this with Firebird 3.0?

Mark
  • [firebi... Matthias Winkler spmm...@gmail.com [firebird-support]
    • Re... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
      • ... Matthias Winkler spmm...@gmail.com [firebird-support]
        • ... Gabor Boros mlngl...@bgss.hu [firebird-support]
        • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
          • ... Matthias Winkler spmm...@gmail.com [firebird-support]
            • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
              • ... Matthias Winkler spmm...@gmail.com [firebird-support]
                • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
          • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
            • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
              • ... Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]

Reply via email to