Well I have a site that I run and made a testing version on home pc via xampp. Also made a nice nifty stored procedure which makes a table that shows all the duplicate entries, however while it executes through all the table records (over 30,000) on production server, it'll barely get through afew hundred on home tester as it seems to finish early (everytime it's around 2 minutes and 20-30 seconds). So right now I'm stumped on why tester MySQL is acting like crap with this mysql/cursor SP & finishing execution after 2+ minutes everytime. No error message to even tell me that something is going haywire since running it in command line gives me "Query OK, 0 rows affected (2 min 25.95 sec)" which would suggest that everything is peaches n cream (of course it isn't since it isn't even getting through 1% of the database) when it isn't. Any help please would be greatly appreciated
Im not sure why you would want to use a cursor to find duplicate results, you can do this with pure SQL much quicker
lol... you know, funny you mention that because I had written stuff in MS SQL Server (2000) that had me avoid cursors... however in this instance I'm not sure how to convert that SP/User Function code to MySQL especially seeing how some of the stuff seemed like a hack in string manipulation that may only work within that SQL Server environment. Thus me trying to work on this cursor until I could figure out how to have same functionality coded out on MySQL... ...which of course brings me to this current problem of stored procedure not completing it's run & quitting after 2 minutes. Of course, with the cursor running for about 1 hour & 30+ minutes I'm also all ears if you also have any ideas on some of the bits of SQL Server code coverted into MySQL... just was saving that one for later since that's a seemingly different issue that I was gonna ask you good folks in another thread
meeeh, nevermind Like somone else hinted at, I found a way around stinkin cursors altogether ^_^. Just used the COUNT of my query and a loop to go through each row. Not that much faster, but it at least goes through all rows that I want it to go through while seemingly having a bit more control. Also helps that the table's ID's are ints that I could account for via incrementing counters