Performance:: > = < = versus Between???

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
  

Poston Wed, 06 Jul 2005 2:15 pm

Guys, good afternoon.

When it comes to performance of a select on the base, I wonder which of the two commands below is the most performing and if possible your why?

-Between-greater than or equal less than or equal to e.g. select * from table where dt_fim between ' ' and ' ' July 5, 05 July 1, 05 or Ex: select * from table where dt_fim > = ' July 1, 05 ' and dt_fim = ' < July 5, 05 ' thank you very much.
Hug, Cheezburger Network
Trevisolli
Location: Araraquara - SP

Poston Wed, 06 Jul 2005 2:34 pm

As far as I know, the two are equal in terms of performance.

What can change there is the presence of an index on the field! (if not, he is obliged to make a full-scan)
dr_gori
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?
http://glufke.net/oracle/search.php?search_id=unanswered

Poston Tue, 02 Aug 2005 5:45 pm

I'm not sure, but until the adopted methodology aq in the company, it seems to me that the between by be a function is slower (requires more server processing) but I have no way to confirm.
Despite being more practical and cleaner the between is recommended to use the < =.
Hugs ... until.
Rafael. :-o
Rpizao
Location: RJ

Poston Wed, 12 Apr 2006 12:03 pm

Hello everyone, I did some tests here in the company and checked that there's practically no difference in performance between the two forms. This should occur on account of the query optimizer of oracle.
He is responsible for resolving the best way to perform a given query. So the optimizer will always generate the same response to the consultations mentioned above, by doing so, they have similar performance.

Abs ... :D
Kaizzaer
Location: Rio de Janeiro - RJ

Poston Thu, 27 Apr 2006 9:21 pm

Cheezburger network, I was having a problem similar to yours.

I realized that there was an improvement of performance by using the ' > = and < = ', but there's nothing I can say!

Unfortunately the code gets bigger, but I preferred to use it anyway.

Best regards
asarmento
Location: Salvador - BA

Álvaro Sarmento
Analista de Sistemas
Unitech - Tecnologia de Informação
www.unitech.com.br



Return to PL/SQL

Who is online

Users browsing this forum: No registered users and 9 guests