Doubts with ide Dbeaver

0

I'm using DBeaver with DBMS oracle .

I wanted to make an average runtime to compare at the time of optimizations, but I'm in doubt, which means

"688 row(s) fetched - 3ms (+20ms)"

With this 3ms outside the parentheses and the 20 inside and ways to optimize queries, I'm still new to this.

    
asked by anonymous 10.11.2018 / 12:05

1 answer

0

This function was implemented as a solution for issue # 1478:

link

According to the source code, the part outside the parentheses is the execution time and the inside is the fetch time . execution time is the time it takes the database to identify the records that should be returned based on your query. fetch time is how long the bank took to deliver the data.

So, if you do SELECT * FROM ANO_MODELO the database will have almost no work to identify the records that should be returned, since you want the whole table. So you would have a smaller execution time but a larger fetch time , because the amount of records is larger and requires more time to fetch.

Below is the code snippet that details the implementation (GitHub source):

    if (statistics == null || statistics.isEmpty()) {
        return "";
    }

    long fetchTime = statistics.getFetchTime();
    long totalTime = statistics.getTotalTime();
    if (fetchTime <= 0) {
        return " - " + RuntimeUtils.formatExecutionTime(totalTime);
    } else {
        return " - " + RuntimeUtils.formatExecutionTime(statistics.getExecuteTime()) + " (+" + RuntimeUtils.formatExecutionTime(fetchTime) + ")";
    }
}
    
10.11.2018 / 12:37