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)
114 views Asked by AudioBubble At
1
There are 1 answers
Related Questions in MYSQL
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to change woocomerce or full wordpress currency with value from USD to AUD
- window.location.href redirects but is causing problems on the webpage
- Error: local variable 'bramka' referenced before assignment
- Products aren't displayed after fetching data from mysql db (node.js & express)
- status table for all entries (even in different dates) in database changing value when all checkboxes are checked
- Can't Fix Mariadb & Mysql ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2) On MacOs
- Express Mysql getting max ID from table not working cought in a promise
- failed to upload a table from sql file
- Update a MySQL row depending on the ID in Google Sheets Apps Script
- Use row values from another table to select them as columns and establish relations between them (pivot table)
- SQL: Generate combination table based on source and destination column from same table
- How to display the column names which have only unique non-null values in MySQL table?
- mysql query takes too long because of wrong indexes usage
- Multitable joining in Sql
Related Questions in MYSQL-WORKBENCH
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- Creating Relationship Creates Additional Columns in MySQL Workbench
- MySQL Workbench [BUG]
- Error in releasing pool connection in node project
- MySQL Workbench not showing Apply and Revert buttons while creating a table
- How I can store multilevel comments of user in MySQL dB
- MySQL Workbench gives duplicate warnings when there should not be any
- How to Revert import Schema in Mysql Work Bench
- Error 29 on mysql workbench, how to fix it?
- I want to call a my secure Rest API created in Spring boot using Javascript but its giving error
- Statement incomplete in mysql
- Load data local infile with double quotes and commas in fields
- There was an error while applying the SQL script to the database
- MYSQL won't allow me to create a table
- I am trying to connect to remote server using mysql workbench but i can't. I am using ubantu 22
Related Questions in MYSQL-5.5
- Referencing another column in HAVING clause
- Whenever I try to run a sql script, I get stuck
- SQL deduplication with criteria that has non-unique values
- How to store db data to a file with mysql 5.5 trigger
- how to parse the byte array of type datetime(3) in the binlog of mysql5.5
- Select latest ID only, if it matches criteria
- MySql database 5.5.46 version - Check login of each user
- How to write 'create table ... as select [some number/function] as test' in MySQL 5.5 so that the table gets a column of data type int(11)?
- Selecting Max record in nested Join more efficiently
- index not used in subquery where in clause
- how do I make this query work mysql 5.5.20 two tables with rank function
- Mysql search string in all fields slowness after version upgraded to 5.6
- MySQL - Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
- MySQL: How to get maintenance schedule from mileage periods
- Delete all rows except 2 for each SID (descending order)
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?
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)
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