In my REST API call, in the code, I've been calling some SQL statements like this based on the flag value supplied at the time of web service call. I am wondering if this is an inefficient way of calling different SQLs ? The reason I am wondering is, because, my webservice call is taking 80,000ms to execute this
particular webservice call. And when I typed the exact SQL in the Oracle SQL developer's SQL Worksheet, it took only 7.4 seconds (~7000ms). So, it doesn't look like a SQL issue to me or is it like REST API calls tend to take more time than directly executing the SQL on the SQL developer?