Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql faster insert

CREATE TABLE copy LIKE original;

ALTER TABLE copy DISABLE KEYS;
SET unique_checks=0; SET foreign_key_checks=0; 

INSERT INTO copy SELECT * FROM original;

ALTER TABLE copy ENABLE KEYS;
SET unique_checks=1; SET foreign_key_checks=1;
Comment

PREVIOUS NEXT
Code Example
Sql :: how to find median of a column sql 
Sql :: stored procedures example 
Sql :: subquery in select 
Sql :: psql database does not exist 
Sql :: microsoft sql server import bak file 
Sql :: modify column name in tsql 
Sql :: what is a stored procedure 
Sql :: join multiple tables 
Sql :: mysql view command 
Sql :: how to use db.execute 
Sql :: call scalar valued function sql 
Sql :: mask data in sql 
Sql :: how to Activate the database 
Sql :: Error in connection_import_file(conn@ptr, name, value, sep, eol, skip) : RS_sqlite_import: test.csv line 2 expected 11 columns of data but found 1 
Csharp :: minimize window form c# 
Csharp :: how to make a hello world program in c# 
Csharp :: asp.net validate web.config 
Csharp :: unity how to get y value 
Csharp :: camera follow 
Csharp :: vue.createapp is not a function 
Csharp :: hide console window c# 
Csharp :: c sharp list of strings 
Csharp :: c# char to int 
Csharp :: set player position unity 
Csharp :: unity print to console 
Csharp :: get text between two strings c# 
Csharp :: c# string to sha256 
Csharp :: how to get all files from folder and subfolders in c# 
Csharp :: c# run c# code from string 
Csharp :: How to read StreamReader text line by line 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =