I have a mysql database that i am parsing files from a log and inputting it inside. So far including a simple 4mb file in the database could take me about 4 minutes to insert ! and i have about 10.000 of such files to process. At first i thought it's my script but after further digging i learned that this could be related to indexes. I have a table with 4 columns, 1 primary key and 2 foreign keys which are by default indexes. From this is it possible to know if the indexes affect insertion performances ? I can't seem to use Explain Insert with mysql so i don't know of any more information to provide. I am confused if i should drop the indexes but i don't know how not to cause catastrophes.
Indexes slowing Insertions(Can't use Explain Insert to Analyse)
112 Views Asked by AudioBubble At
1
There are 1 best solutions below
Related Questions in MYSQL
- MySQL Select Rank
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Push mysql database script to server using git
- Why does mysql stop using indexes when date ranges are added to the query?
- Google Maps API Re-size
- store numpy array in mysql
- Whats wrong with this query? Using ands
- MySQL-Auto increment
- show duplicate values subquery mysql
- Java Web Application Query Is Not Working
- microsoft odbc driver manager data source name not found and no default driver specified
- Setting foreign key in phpMyAdmin
- No responses from google places text search api
- Adding to MAMP database in SQL/PHP
- I want to remove certain parent- and child-divs in all my wordpress posts with php or some other script
Related Questions in MYSQL-WORKBENCH
- Solving mysql query
- How to connect MySQL workbench to database
- How to select multiple avg(column) in one select statement in MySql stored procedure?
- MySQL error: The maximum column size is 767 bytes
- How to change my sql to loop in MySql stored procedure in mysql?
- Print the executed stored procedure in MySQL workbench
- Mysql: Getting the 2nd earliest date for each group
- Delete where TimeStamp is minimum in table
- No Synchronize Model with Database in Mysql Workbench
- Creating a stored procedure - MySQL
- How to travers query results and then call the other Stored Procedure in MySQL Stored Procedure?
- Use is not valid input at this position MySQL Workbench
- MySQL alias replaced by column name when creating view involving subquery
- Optimizations for MySQL Data Import
- Mysql How can i find max and min after sum a column
Related Questions in MYSQL-5.5
- Too much time on optimal path
- Mysqldump: Couldnt execute SET OPTION SQL_QUOTE_SHOW_CREATE=1 mysql 5.6
- MySQL 5.5 IF exists THEN syntax issue
- timestamp error in mysql while installing magento
- MySQL round in query, wrong result
- Unable to execute a foreign key in MySQL 5.5 (using XAMPP)
- Mysql: Clients with missing monthly data
- Multiple database connection using php userdefined function
- SQL Query to fetch data from 4 different tables
- SUBSTRING_INDEX sort the number with the symbol and the character
- Show Binlog retention on MySQL prior to version 5.6
- Indexes slowing Insertions(Can't use Explain Insert to Analyse)
- MySQL: unknown table in field list
- MySQL 5.5: is it better to use IN(...) or a series of EQUALS-AND's?
- WAR file deploys an innodb Database when I specified it should deploy with myISAM dialect
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
INSERT has to update all the indexes. It also has to check all the foreign key constraints, which requires lookups in the other tables' indexes.
The foreign key checks may be what's slowing you down. If you're sure that all the data you're inserting is clean, you can temporarily disable these checks while you're doing your mass insertion:
Documentation