Tengo un archivo SQL de 2.5GB y en 5 horas iba por 23%. Lo que noto es que comienza muy bien y luego se va demorando cada vez más entre consultas llegando a demorar más de 1 min entre consultas. Probé muchas variantes, me comí a google y leí mucha documentación pero en ningún cambio que realizaba se notaba la mejoría. Estoy usando el Navicat y la consulta no es más que una copia de seguridad de la DB por lo que solo trae sentencias create
e insert
.
Mi ordenador:
Procesador: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz 2.60 GHz
RAM instalada: 8,00 GB (7,86 GB usable)
Utilizo la última versión de XAMPP, xampp-windows-x64-8.2.4-0-VS16
¿Qué variables tengo que modificar y qué valores tendría que ponerle para una mejor velocidad, o hay que hacerle algo en especial a los archivos sql? Acá les dejo mi configuración del archivo My.ini, es su estado por defecto y comentado están las variables que modifiqué.
Voy a quitarle un poco los comentarios para que no se haga muy extenso.
# The following options will be passed to all MySQL clients
[client]
# password = your_password
port=3306
socket="D:/xampp/mysql/mysql.sock"
# Here follows entries for some specific programs
# The MySQL server
default-character-set=utf8mb4
[mysqld]
port=3306
socket="D:/xampp/mysql/mysql.sock"
basedir="D:/xampp/mysql"
tmpdir="D:/xampp/tmp"
datadir="D:/xampp/mysql/data"
pid_file="mysql.pid"
# enable-named-pipe
key_buffer=16M
max_allowed_packet=100M
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M
log_error="mysql_error.log"
#Variables modificadada para mejorar la velocidad
#key_buffer_size=384M
#max_allowed_packet=100M
#table_open_cache=512
#sort_buffer_size=2M
#read_buffer_size=2M
#read_rnd_buffer_size=8M
#myisam_sort_buffer_size=64M
#thread_cache_size=8
#query_cache_size=32M
#Try number of CPUs*2 for thread_concurrency
#thread_concurrency=8
# Change here for bind listening
# bind-address="127.0.0.1"
# bind-address = ::1 # for ipv6
# Where do all the plugins live
plugin_dir="D:/xampp/mysql/lib/plugin/"
server-id =1
# Comment the following if you are using InnoDB tables
#skip-innodb
innodb_data_home_dir="D:/xampp/mysql/data"
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_group_home_dir="D:/xampp/mysql/data"
#innodb_log_arch_dir = "D:/xampp/mysql/data"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high
innodb_buffer_pool_size=16M
## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size=5M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_lock_wait_timeout=50
## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="D:/xampp/mysql/share/charsets"
sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION
log_bin_trust_function_creators=1
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
[mysqldump]
max_allowed_packet=16M
[mysql]
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
#key_buffer=20M
#sort_buffer_size=20M
#read_buffer=2M
#write_buffer=2M
[myisamchk]
key_buffer=20M
sort_buffer_size=20M
read_buffer=2M
write_buffer=2M
#Variables modificadada para mejorar la velocidad
#key_buffer_size=256M
#sort_buffer_size=256M
#read_buffer=2M
#write_buffer=2M
[mysqlhotcopy]
#Variable modificadada para mejorar la velocidad
#interactive_timeout=1
SELECT
)? o te refieres a las consultas realizadas después de cargar el archivo SQL. ¿Es un archivo único o cada cuánto lo cargas? ¿Importas a una o a varias tablas?.