46

How to increase buffer size in Oracle SQL Developer to view all records (there seems to be a certain limit set at default)? Any screen shots and/or tips will be very helpful.

12 Answers 12

43

https://forums.oracle.com/forums/thread.jspa?threadID=447344

The pertinent section reads:

There's no setting to fetch all records. You wouldn't like SQL Developer to fetch for minutes on big tables anyway. If, for 1 specific table, you want to fetch all records, you can do Control-End in the results pane to go to the last record. You could time the fetching time yourself, but that will vary on the network speed and congestion, the program (SQL*Plus will be quicker than SQL Dev because it's more simple), etc.

There is also a button on the toolbar which is a "Fetch All" button.

FWIW Be careful retrieving all records, for a very large recordset it could cause you to have all sorts of memory issues etc.

As far as I know, SQL Developer uses JDBC behind the scenes to fetch the records and the limit is set by the JDBC setMaxRows() procedure, if you could alter this (it would prob be unsupported) then you might be able to change the SQL Developer behaviour.

4
  • 16
    I'm running SQL Developer 3.2.20.09 and I don't see a "Fetch All" button. But the control-end works great. Thanks.
    – yellavon
    Jul 19, 2013 at 18:53
  • 14
    Ctrl + End works for getting all rows of any SQL, not just one specific table.
    – arun
    Nov 1, 2016 at 20:34
  • 1
    FYI we do not use setMaxRows()
    – Kris Rice
    Feb 4, 2018 at 14:32
  • 1
    record count code - press control-a on result set. this is an alternative to control-end. Apr 16, 2020 at 21:40
38

Select Tools > Preferences > Database / Advanced

There is an input field for Sql Array Fetch Size but it only allows setting a max of 500 rows.

2
  • 4
    Note that Max is 200 on sql developer version 4.2.0.16.260 Sep 20, 2017 at 9:02
  • 1
    SQL Developer 21.4 (latest version in 2023) also still has the 200 row maximum.
    – Mike
    Apr 17 at 3:47
16

It is easy, but takes 3 steps:

  1. In SQL Developer, enter your query in the "Worksheet" and highlight it, and press F9 to run it. The first 50 rows will be fetched into the "Query Result" window.
  2. Click on any cell in the "Query Result" window to set the focus to that window.
  3. Hold the Ctrl key and tap the "A" key.

All rows will be fetched into the "Query Result" window!

12

If you are running a script, instead of a statement, you can increase this by selecting Tools/Preferences/Worksheet and increasing "Max Rows to print in a script". The default is 5000, you can change it to any size.

0
9

You can also edit the preferences file by hand to set the Array Fetch Size to any value.

Mine is found at C:\Users\<user>\AppData\Roaming\SQL Developer\system4.0.2.15.21\o.sqldeveloper.12.2.0.15.21\product-preferences.xml on Win 7 (x64).

The value is on line 372 for me and reads <value n="ARRAYFETCHSIZE" v="200"/>

I have changed it to 2000 and it works for me.

I had to restart SQL Developer.

1
  • This is awesome, thanks a lot. It would be nice to store the result set in cache so if you sort by a column, it doesn't have to re-run the query. Any tips on how to do this?
    – ravioli
    Dec 22, 2019 at 7:53
6

press f5 for running queries instead of f9. It will give you all the results in one go...

6

Tools-> Preferences -> Database ->Worksheet

Enter desired size in "Max rows to print in a script"

Save changes.

6

After you fetch the first 50 rows in the query windows, simply click on any column to get focus on the query window, then once selected do ctrl + end key

This will load the full result set (all rows)

4

after you retrieve the first 50 rows in the query windows, simply click a column to get focus on the query window, then once selected do ctrl + pagedown

This will load the full result set (all rows)

1
  • 3
    Thanks Alex, but it is ctrl + end key for me. Sep 3, 2020 at 5:36
1

Here is another cheat:

Limit your query if you don't really need all the rows. i.e.

WHERE rownum <= 10000

Then click on any cell of the results and do from your keyboard CTRL+END. This will force SQL Developer to scroll until the bottom result of your query.

This has the advantage of keeping the default behavior and use this on demand.

1

I know this is a bit late, but just use your OS shortcut to select all (Command + a on macOS or Ctrl + a on Windows), this will force fetch all results to select all rows :)

0

On PL SQL Developer 13.0.6, go to Configure > Preferences. On the left side menu look for SQL Window. There is an option called Records per Page. I changed it to "All records" and it does the trick.

Not the answer you're looking for? Browse other questions tagged or ask your own question.