Hello!

 

I want to share this query with you to find out what can be the problema now
with this query example:

 

The test database has PROC with 46k records and MOVI with 1200k records.

 

select "PROC" from "PROC" where "PROC" in (

select distinct "PROC" 

                               from "MOVI" 

                               where "MOVI"."TIPO" in ('1','A','B') 

                                               and ("MOVI"."FECH" between
'20190301' and '20190412') 

                                               and "MOVI"."MIEM" =
'15JMS45D7A' 

                                               and "MOVI"."HECH" = 'N' order
by "PROC")

 

In a test machine this query perfoms well when I try it with FIREBIRD 2.5.0
or 2.5.2 (less than 30 seconds). But when I test with 2.5.8 it goes to more
than 24 minutes.

 

If I only do:

 

select distinct "PROC" 

                               from "MOVI" 

                               where "MOVI"."TIPO" in ('1','A','B') 

                                               and ("MOVI"."FECH" between
'20190301' and '20190412') 

                                               and "MOVI"."MIEM" =
'15JMS45D7A' 

                                               and "MOVI"."HECH" = 'N' order
by "PROC"

 

It takes 4 or 5 seconds.

 

What can be the problem with this query undewr 2.5.8?

 

Thanks a lot for any help!

 

Best regards,

 

Dany

 

Reply via email to