Imagine we have an sql such as SELECT something FROM TableName WHERE something NOT IN (SELECT ...); And result size of second SELECT is a huge. So what if I change second SELECT by generated string value such as "a1, a2, a3, ... an", where is n - is a really big number. Will I get an error that sql query size is too large? Is this size limited? Is this size different for result of second SELECT and generated string?
Asked
Active
Viewed 50 times
0
-
It will mostly depend on the database you use and not the JVM. – tsolakp Oct 24 '18 at 16:24
-
Without a database tag, this question is too broad. There are lots and lots of databases and application interfaces to them. – Gordon Linoff Oct 24 '18 at 22:50
-
Database - clickhouse – Vladislav Kiper Oct 25 '18 at 13:45
1 Answers
0
This completely depends on your database engine/server. You can play with database specific settings to overcome (or) at least extend some of these limits.
But overall I think you should look for solutions liks "Join" instead of subqueries. There are some advantages with that approach.

kosa
- 65,990
- 13
- 130
- 167