Home > database >  Big data matching batch database
Big data matching batch database

Time:09-29

 
Select id, jm, lk from biao_a where id in
(' 01 '. '02'. '03,' 04 '... '260003',... '1000000'); .


In the back there is a lot of conditions, report directly to run ORACLE - 01795 cannot exceed 1000 rows of data, don't call me or add after every 1000 in number too much will be the dead... And this is the production libraries can't optional change parameters...

The large quantities of data query how ah

CodePudding user response:

Set up a temporary table
 select id, jm, lk from biao_a where id (select id from temp) 

CodePudding user response:

1000 in efficiency can go quickly, rewritten into writing upstairs

CodePudding user response:

reference 1st floor qq_38884602 response:
set up a temporary table
 select id, jm, lk from biao_a where id (select id from temp) 

Writes, those a lot of conditions in which position ~

CodePudding user response:

 create table c (
Id VARCHAR2 (20 BYTE)
)

Declare
The begin
For I in 1.. 10000
Loop
Insert into c values (I);
End loop;
end;



03 01, 02 yourself in front can add a 0

CodePudding user response:

The
reference 4 floor qq_38884602 reply:
 create table c (
Id VARCHAR2 (20 BYTE)
)

Declare
The begin
For I in 1.. 10000
Loop
Insert into c values (I);
End loop;
end;



03 01, 02 you add a zero in front can be the


In later don't quotes and comma

CodePudding user response:

The
reference 4 floor qq_38884602 reply:
 create table c (
Id VARCHAR2 (20 BYTE)
)

Declare
The begin
For I in 1.. 10000
Loop
Insert into c values (I);
End loop;
end;



03 01, 02 you add a zero in front can be the

Error 00922

CodePudding user response:

Do not use in large quantities of matching information efficiency is very low, and it is better to the exists
Can be put in the content in into a temporary table
The create table temp01 (id varchar2 (32));
Select id, jm, lk from biao_a zb where the exists (select 1 from temp01 cb where cb. Id=zb. Id);

Don't know what you need to match the data, if we can use is greater than, less than, to deal with,
If it is 01, 02-1000,,, 10000
Direct the where id<=10000 is ok if you have more, can the union,

CodePudding user response:

Use the subquery...

CodePudding user response:

# 7 say is very reasonable, # 4 terms of code is the creation of a temporary table and add condition data, the cause of the error is
 create table c (
Id VARCHAR2 (20 BYTE)
) ;

Declare
The begin
For I in 1.. 10000
Loop
Insert into c values (I);
End loop;
end;
need a semicolon

CodePudding user response:

The create table c (
Id VARCHAR2 (20 BYTE)
) ;

Declare
The begin
For I in 1.. 10000
Loop
Insert into c values (I);
End loop;
end;
  • Related