Dear Admin, I want to know how to deal with this problem that solutions runtime less than 2000ms.


  • 0
    Z

    I try 2 method with
    select name, population, area from World where population > 25000000 or area > 3000000;
    and
    select name, population, area from World where population > 25000000 union all select name, population, area from World where area > 3000000 ;
    The solutions runtime is 3115ms and 3217 ms .
    I see the create table sql don't have index ,so I want to know how to deal .
    Thank you see this.
    I am Chinese, English is not very good, please be more.


  • 0
    J

    You could try parallel hint if you are using Oracle Database.

    select /*+ PARALLEL (World , 4) */ name, population, area from World where population > 25000000 or area > 3000000;


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.