Recently, during a code review with a senior developer, he told me that there is a limitation with queryForList that it can only fetch 1000 records. But when I searched on the net I can't find any limitation. So is there any kind of limitation on JdbcTemplate's queryForList?
Asked
Active
Viewed 179 times
0
-
1There's no limit. He may be confusing it with the fetch size, but that's a different thing, and even with that the default is unlimited (or rather "unspecified", so the driver default is used). – Kayaman Jun 05 '20 at 09:27
2 Answers
2
Oracle database only allows for the maximum of 1000 records see the following error:
Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
To resolve this, please see the following thread. Is there a workaround for ORA-01795: maximum number of expressions in a list is 1000 error?

Dot Batch
- 608
- 6
- 17
-1
No, your developer is confusing it with INSERT
statements, I presume you're using Oracle DBMS, where you can only insert upto 1000 records in a single statement.

mohammedkhan
- 953
- 6
- 14