Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 6

Displaying posts with tag: load data (reset)

Testing the Fastest Way to Import a Table into MySQL (and some interesting 5.7 performance results)
+2 Vote Up -0Vote Down

As I mentioned on my last post, where I compared the default configurations options in 5.6 and 5.7, I have been doing some testing for a particular load in several versions of MySQL. What I have been checking is different ways to load a CSV file (the same file I used for testing the compression tools) into MySQL. For those seasoned MySQL DBAs and programmers, you …

  [Read more...]
Which Compression Tool Should I Use for my Database Backups? (Part I: Compression)
+0 Vote Up -0Vote Down

This week we are talking about size, which is a subject that should matter to any system administrator in charge of the backup system of any project, and in particular database backups.

I sometimes get questions about what should be the best compression tool to apply during a particular backup system: gzip? bzip2? any other?

The testing environment

In order to test several formats and tools, I created a .csv file (comma-separated values) that was 3,700,635,579 bytes in size by transforming a recent dump of all the OpenStreetMap nodes …

  [Read more...]
Load columnar text file into MySQL table
+0 Vote Up -0Vote Down

Ever come accoss a situation where you have to load a flat text file into MySQL with data provided in single column! Say, your data to be loaded in table looks something like this: Company1 Street Name City, MyState 8582 (999)999-999 another_Company Another Street 2 New City, NWSTATE 8582 (111)111-1111 So how’d you go about […]

Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL
+2 Vote Up -0Vote Down

Okay! So here we will use Load Data syntax to load file into MySQL Server in a Stored procedure. Yep! It’s a workaround. Download MySQL UDF: [root@localhost kedar]# wget http://www.mysqludf.org/lib_mysqludf_sys/lib_mysqludf_sys_0.0.3.tar.gz [refer: http://www.mysqludf.org/] Extract and Install: [root@localhost kedar]# tar -xzvf lib_mysqludf_sys_0.0.3.tar.gz install.sh lib_mysqludf_sys.c lib_mysqludf_sys.html lib_mysqludf_sys.so lib_mysqludf_sys.sql Makefile [root@localhost kedar]# sh install.sh Compiling the MySQL UDF gcc […]

LOAD DATA: a tricky replication issue
+7 Vote Up -0Vote Down

When you are importing large amounts of data from other sources LOAD DATA is a common method of inserting data into a table.
It is one of the old commands implemented in MySQL. As such it is very fast, and it has been optimized for both MyISAM and InnoDB.
All is well when you are loading data into a standalone server. All is almost well when you are using replication. LOAD DATA used to be a problem in old versions of MYSQL, prior to 4.1. With recent versions of MySQL, it is replicated correctly, and sometimes efficiently.
The trouble starts when …


  [Read more...]
Loading data from files
+0 Vote Up -0Vote Down

Having already blogged about loading data from flat files to MySQL, it's time to post a similar case for PostgreSQL, as the manual seems to lack a real life example ...First of all the table to be loadedCREATE TABLE target(code character(3) NOT NULL,"name" character varying(50) NOT NULL,amount numeric,CONSTRAINT pk_1 PRIMARY KEY (code))WITH (OIDS=FALSE);as you can see one of the column names is a

Showing entries 1 to 6

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.