Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-06-2013, 11:38 AM   PM User | #1
sitechooser
New Coder

 
Join Date: Jan 2013
Posts: 16
Thanks: 6
Thanked 0 Times in 0 Posts
sitechooser is an unknown quantity at this point
PHPMyAdmin Large File Upload Issue

Hi Everyone, I hope someone can advise here - we have an opportunity to work with a large company who need data extracting from a database with 700,000 records in it. We have a meeting on Friday which could be make or break for our company.

We have been trying to import an 80 MB csv file into a MySQL database using phpmyadmin and it's taking a very long time to upload the file. We have tried every variant of csv file that we can think of and they all either take ages to upload or just crash. When we have managed to upload a file, a simple query takes 15 minutes or more to run.

The table has 22 columns, are we expecting too much from phpmyadmin and mySQL or should this be a simple job for it? Any advice would be greatly appreciated.
sitechooser is offline   Reply With Quote
Old 03-06-2013, 04:00 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,748
Thanks: 4
Thanked 2,466 Times in 2,435 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Yep, 80MB is big. That could be rejected by PHP itself. You should be able to configure these directives in PHP.ini as well. You need to look for POST_MAX_SIZE, UPLOAD_MAX_FILESIZE, MEMORY_LIMIT, and set the set_time_limit to increase the timeout. These all need to be larger than the file, and POST_MAX_SIZE should be > UPLOAD_MAX_FILESIZE (and MEMORY_LIMIT needs to be > POST_MAX_SIZE). And these are just the limitations with the PHP itself, I haven't a clue if phpmyadmin has any of its own.

All and all, why not just execute a command line call to the mysql dbms and provide it the file that way?
__________________
PHP Code:
header('HTTP/1.1 420 Enhance Your Calm'); 
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
sitechooser (03-06-2013)
Old 03-06-2013, 10:16 PM   PM User | #3
sitechooser
New Coder

 
Join Date: Jan 2013
Posts: 16
Thanks: 6
Thanked 0 Times in 0 Posts
sitechooser is an unknown quantity at this point
Thanks for the response and advice. We tried all of your suggestions but in the end I think phphmyadmin as the weak link. MySQL workbench came to the rescue and all our slow upload and query issues vanished. If anyone else if having these issues I would highly recommend the switch.
sitechooser is offline   Reply With Quote
Old 03-06-2013, 11:31 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,748
Thanks: 4
Thanked 2,466 Times in 2,435 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Quote:
Originally Posted by sitechooser View Post
Thanks for the response and advice. We tried all of your suggestions but in the end I think phphmyadmin as the weak link. MySQL workbench came to the rescue and all our slow upload and query issues vanished. If anyone else if having these issues I would highly recommend the switch.
Yep, there's really no need to even use the phpmyadmin.
Although, I have installed it within the past few months on my home machine just to see what people are talking about when they have questions about it. It seems to be great for minor modifications and overall viewing, but with lack of being able to do easily view the related data, I may as well just stick with the command line. There was also one structural change I couldn't do from the phpmyadmin. It was removal of something, not a column or anything like that, but I can't remember what it was. Had to do it from the command line.
__________________
PHP Code:
header('HTTP/1.1 420 Enhance Your Calm'); 
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:24 PM.


Advertisement
Log in to turn off these ads.