From: Peter Brawley Date: November 23 2012 4:19pm Subject: Re: Stored Procedure Question? List-Archive: http://lists.mysql.com/mysql/228714 Message-Id: <50AFA21B.7070403@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > when I call a > stored procedure does the control get backs immediately to the php script? No, sprocs wil lvery likely slow you down. Probably best to split the job into several part-tasks (i) read rows into a work buffer, (ii) walk the work buffer and mark done rows, (iii) walk the done list and insert them. PB ----- On 2012-11-22 11:19 PM, Girish Talluru wrote: > Hi There, > > I have a scenario where I have to screen a huge bunch of records for in db > using certain rules. I have done in traditional php style record by record > and it took 90 mins for 4000 records. I have 800k - 900k records in > production which might possibly lead to days of execution. > > I have figured out that the php script does wait for the record to execute > and then only after it it will process the next record. For this if it is > java I should have used stored procedure and multithreading concept to run > multiple threads in parallel. > > But I don't think PHP supports multithreading. Now I have idea to create a > stored procedure to do all the checks and my question here is when I call a > stored procedure does the control get backs immediately to the php script? > Bcoz I want to pick other record immediately while the first one going > through the process and call the procedure again. > > Thanks, > Girish Talluru >