Forum Stats

  • 3,728,154 Users
  • 2,245,559 Discussions


Slow startup time

zef Member Posts: 4 Red Ribbon

It seems that sqlcl starts significantly slower compared to SQL*Plus.

Using SQL*Plus for my sql-scripts is nearly immediate. With sqlcl it takes a few seconds to start and connect to the database. Ok, once sqlcl is started and connected, then the execution time is also ok. But many of my scripts are rather designed to terminate SQL*Plus afterwards.

Is there any trick or workaround to deal with this issue?


  • user9540031
    user9540031 Member Posts: 87 Silver Badge

    sqlcl is a Java program, which means it runs inside a JVM—Java Virtual Machine—and a lot must happen whenever it is started: class-loading, memory management, JIT compilation... Therefore, I would never expect it to start nearly as fast as SQL*Plus, which is written in C. The memory footprint of SQL*Plus should be considerably smaller too.

    So, if you have shell scripts which call SQL*Plus frequently in order to run just a query or two (or whatever short action on the database) and then exit from SQL*Plus and carry on, and possibly many of these may be running simultaneously... for this kind of scripts you most likely want to keep using SQL*Plus.

    Bottom line: sqlcl is a replacement for SQL*Plus for interactive use, or for complex tasks which it can do and SQL*Plus cannot, or tasks that sqlcl does better. It's not a 100% replacement for SQL*Plus in that, when it comes to doing simple database things fast in shell scripts, SQL*Plus remains a potent, reliable, and fast database client with a much smaller memory footprint.

    My 2 cents...

    Billy Verreynne
Sign In or Register to comment.