Mail failure
Posted in 1998
Topics: General Discussion
Hi
I been having some problems with a query, it use to get lost in the data
and never come out with anything.
After many revision, now it just takes eternity to answer, thow I think
the index are ok, i am not too shure that the query is using them or is is
maybe the construccion which is kind of wrong. So I want to ask you specifi
topics
1.- matches versus greather
which is faster in a table size mediun to large. To use
-- a matches "aa*"
or to use -- a > a and a < b (where b is the next option)
2. to use between rather than greater and lesser in a table size medium
to large
like number between x and y
or to use number >= x and number <= y
The query that is giving me white hairs is the next one
select count(*) from con_catalogo_cont a, con_partidas_det c where
a.dependencia = '0014201'
and a.numero_cuenta matches '100*'
and a.permiso = 1
and c.dependencia = a.dependencia
and c.serial_cuenta = a.serial_cuenta
and c.fecha_partida between '01/01/1997' and '28/02/1997'
Thanks in advance
Milagro Barneond
Guatemala