Using semicolons in Oracle SQL expressions

Disclaimer: I was just starting work on a new contract that made me switch from MSSQL to Oracle. So, I'm a complete newbie to Oracle and may bring a lot of bad MSSQL methods with me. OK, to the question ...

According to the answer in this thread , semicolons are bad and should be avoided. I understood this firsthand, spending hours trying to figure out why my queries worked so terribly slowly in SQL Developer. After removing the semicolon from the end of a complex query, it ended in a matter of seconds (compared to the fact that I just abandoned it after a few minutes, which was before the semicolon was deleted). This behavior scared me, and a Google search did not remind me when and why I should or should not use semicolons in my SQL statements. Can anyone clarify this with a brief explanation?

And if you have any links to online resources for poor developers migrating from MSSQL to Oracle, I would really appreciate it!

Thanks!

+3
source share
4 answers

This is not a semicolon. Repeating the same query meant that the rows were already cached, so you got them much faster.

+15
source

I come from 5+ years of experience with MS SQL and another 4 years of Oracle development. I know that you will hate many Oracle functions, especially in SQL ,;) but take it easy. Oracle is a really powerful DBMS. Although from a variety of perspectives, I prefer MSSQL over Oracle, but this is a different topic.

Regarding your problem:

The semicolon is just a statement delimiter.

The SQL developer uses Java and OCI, so you may have different problems (I just think something might be wrong).

, - , SQLPLUS Visual Query Tools, .

Oracle.

SQL * Plus.

+4

, SQL

Oracle, SQl-, , Oracle, , t-SQL.

+2

Oracle PowerBuilder, Java,.NET TOAD 10 , .

, , , , , .

From earlier versions of Oracle, I remember that using rule-based optimization can lead to such performance problems, but recently, cost optimization and statistics have made such problems a thing of the past.

+1
source

Source: https://habr.com/ru/post/1708294/


All Articles