Doubt with ide Dbeaver

Asked

Viewed 279 times

0

I’m using the Dbeaver with the SGBD oracle.

I wanted to make an average running time to compare at the time of the 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, because I’m still new at this.

Queria dicas de como usar também

1 answer

0

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

https://github.com/dbeaver/dbeaver/issues/1478

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

Therefore, if you do SELECT * FROM ANO_MODELO the database will have almost no work to identify the records that must be returned once you want the whole table. So you’d have a smaller Execution time but a greater fetch time, because the amount of records is higher and requires more time to be searched.

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) + ")";
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.