Hi,
While inserting data to a temporary table inside the stored procedure in mysql database..
it is taking too long time (8-11 mins) to insert approx 1300 records..i don't understand why..please help.
my lines inside procedure are:
create temporary table mr(PageNo int,RecordNO int ,GranteeFirstName varchar(50),GranteeLastName varchar(50),GrantorFirstName varchar(50),GrantorLastName varchar(50),Deeds varchar(50),RType varchar(50),Book varchar(50),
Volume varchar(50),Page varchar(50),DocumentDate varchar(50),FiledDate varchar(50),
Region varchar(50),Sector varchar(50),Block varchar(50),Survey varchar(50),Description varchar(50));
insert into mr(PageNo,RecordNO,GranteeFirstName,GranteeLastName,GrantorFirstName,GrantorLastName,Deeds,RType,Book,Volume,Page,DocumentDate,FiledDate,Region,Sector,Block,Survey,Description)
select PageNo,RecordNO,GranteeFirstName,GranteeLastName,GrantorFirstName,GrantorLastName,Deeds,RType,Book,Volume,Page,DocumentDate,FiledDate,Region,Sector,Block,Survey,Description from
(select PageNo,RecordNO,GranteeFirstName,GranteeLastName,GrantorFirstName,GrantorLastName,Deeds,RType,Book,Volume,Page,DocumentDate,FiledDate,Region,Sector,Block,Survey,Description from User1DataEntryTable
union all
select PageNo,RecordNO,GranteeFirstName,GranteeLastName,GrantorFirstName,GrantorLastName,Deeds,RType,Book,Volume,Page,DocumentDate,FiledDate,Region,Sector,Block,Survey,Description from User2DataEntryTable) as p
group by PageNo,RecordNO,GranteeFirstName,GranteeLastName,GrantorFirstName,GrantorLastName,Deeds,RType,Book,Volume,Page,DocumentDate,FiledDate,Region,Sector,Block,Survey,Description
having count(*)>1;
any help will be appreciated.. thanks in advance.