Home > database >  Use dblink synchronous data found repetition
Use dblink synchronous data found repetition

Time:09-26

The create table tmp_1234 nologging as
Select * from res_house @ test;

Houseid is a primary key;
The select houseid, count (1)
The from tmp_1234
Group by houseid
Having a count (1) & gt; 1;


Synchronous data had been used this way, now suddenly found the primary key repeat data, there is no duplicate data to a data source database query,
The whole table data about 1300 w, 3000 primary key repeat data; Consulting the company's dba, consistent read may have a problem,

Online has examined the other similar situation with me, but didn't find the reason and solution, for help

CodePudding user response:

Use try heavy grammar,

CodePudding user response:

To see whether there is record data of all empty, the primary key is to allow for empty (unless you are qualified for the not null), empty is not affected by the uniqueness of the data,

CodePudding user response:

reference 1st floor lantian199003 response:
try heavy grammar,


Check the repeat 2 records, are generally have a field is not the same, the other fields are the same

CodePudding user response:

refer to the second floor XLDSsn response:
to see whether there is any record data of all empty, the primary key is to allow for empty (unless you are qualified for the not null), empty is not affected by the uniqueness of data


There is no empty data

CodePudding user response:

I faced similar, usually with core data is modified, the core data modification has been read once, before the revised read and read again and whether this can query the core business system for the operation, increase the timestamp to identify

CodePudding user response:

Only when the session have more than one, will appear consistent reading problems,
If only one session, is not consistent reading problems,

CodePudding user response:

Use dblink synchronization, the following statements can add filter conditions, under the same data only take a houseid, so will not be reported to the primary key error,
 
The create table tmp_1234 nologging as
Select * from res_house @ test;

CodePudding user response:

It is likely to be different data consistent problems: no, don't create table XXX as select * from yyy; Built in the middle table, insert again! Estimate the hurry up! And then using analysis function, on the application end to heavy!
  • Related