Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple queries take very long

When I execute a query for the first time in DBeaver it can take up to 10-15 seconds to display the result. In SQLDeveloper those queries only take a fraction of that time.

For example: Simple "select column1 from table1" statement

DBeaver: 2006ms, SQLDeveloper: 306ms

Example 2 (other way around; so theres no server-side caching): Simple "select column1 from table2" statement

SQLDeveloper: 252ms, DBeaver: 1933ms

DBeavers status box says:

  1. Fetch resultset
  2. Discover attribute column1
  3. Find attribute column1
  4. Late bind attribute colummn1

2, 3 and 4 use most of the query execution time.

I'm using oracle 11g, SQLDeveloper 4.1.1.19 and DBeaver 3.5.8.

See http://dbeaver.jkiss.org/forum/viewtopic.php?f=2&t=1870

What could be the cause?

like image 448
int lawl is over 9000 Avatar asked Sep 16 '25 18:09

int lawl is over 9000


1 Answers

DBeaver looks up some metadata related to objects in your query.

On an Oracle DB, it queries catalog tables such as

  • SYS.ALL_ALL_TABLES / SYS.ALL_OBJECTS - only once after connection, for the first query you execute
  • SYS.ALL_TAB_COLS / SYS.ALL_INDEXES / SYS.ALL_CONSTRAINTS / ... - I believe each time you query a table not used before.

Version 3.6.10 introduced an option to enable/disable a hint used in those queries. Disabling the hint made a huge difference for me. The option is in the Oracle Properties tab of the connection edit dialog. Have a look at issue 360 on dbeaver's github for more info.

like image 159
masebu Avatar answered Sep 19 '25 13:09

masebu