oracle - How to resolve ORA-01795 in Java code -


I got an error in my code ORA-01795 error while executing more than 1000 records . I'm thinking of dividing this into a batch of 1000 entries, such as the separation of the following sections from different sections:

  to select * from table_name where column_name (V1, V2, V3, ... V1000) or column_name (V1001, V1002, V1003, ... V2000)  

I have a string ID like -18435,16690,1719,1082 , 1026,100759 .. which is generated dynamically based on user selection. How to write logic for a situation like 1-1000 records in Java, 1001 to 2000 records etc. Can anyone help me here?

There are three possible ways to this limit:

1) As you did before Only mentioned: Divide the statement in 1000 batches

2) Create a derived table using values ​​and then join them:

  with id_list (id) In the form (select 'V1' from Dual Union, choose from two options 'V3' double selection from Dual Union) Alternatively, you can also join those values ​​- it can also be fast As with ID_list (select 'V1' from Dual Union) select 'V3' from Dual Union 'V2' from Dual Union: Please) Choose from * t to i_list_name = l.id;  

It still gives a really big statement, but there is no limit to 1000 IDs. I'm not sure how fast Oracle will parse it.

3) Enter the value in a (global) floating table and then IN section (or ). Perhaps this is going to be the fastest solution.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -