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

Displaying posts with tag: csv (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 probably know the answer, so you can jump over to my 5.6 versus 5.7 results. However, the first part of this post is dedicated for developers and MySQL beginners that want to know the answer to the title question, in a step-by-step fashion. I must say I

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

On my post last week, I analysed some of the most common compression tools and formats, and its compression speed and ratio. While that could give us a good idea of the performance of those tools, the analysis would be incomplete without researching the decompression. This is particularly true for database backups as, for those cases where the compression process is performed outside of the production boxes, you may not care too much about compression times. In that case, even if it is relatively slow, it will not affect the performance of your MySQL server (or whatever you are using). The decompression time, however, can be critical, as it may influence in many cases the

  [Read more...]
Where are they now: MySQL Storage Engines
+3 Vote Up -0Vote Down

There was once a big hooplah about the MySQL Storage Engine Architecture and how it was easy to just slot in some other method of storage instead of the provided ones. Over the years I’ve repeatedly mentioned how this

  [Read more...]
Check (Rough) Progress of Your CSV Import to MySQL
+0 Vote Up -0Vote Down

If you are importing large CSV or SQL dumps to MySQL, chances are you were looking for ways to see how far the import has gone. If you know how many rows there are from the file being imported, you can do a SELECT COUNT(*) but that would take sometime for the query to finish especially on really big imports.

Using lsof, you can monitor the current file offset to which a process is reading from using the -o option. Knowing the size of the file and some snapshots of the offset, you can get a somewhat rough idea of how fast the import goes. Note though that this is only file-read-pace not actual import speed as MySQL import can vary depending on a number of conditions i.e. table growth, secondary indexes, etc.

Let’s say I am importing a 1.1G CSV file into a table.

[revin@forge msb_5_5_300]$ ls -al
  [Read more...]
Tech Messages | 2013-03-10
+0 Vote Up -0Vote Down

A special extended edition of Tech Messages for 2013-03-07 through 2013-03-10:

Two Cons against NoSQL. Part I.
+1 Vote Up -1Vote Down
Two cons against NoSQL data stores read like this: 1. It’s very hard to move data out from one NoSQL to some other system, even other NoSQL. There is a very hard lock in when it comes to NoSQL. If you ever have to move to another database, you have basically to re-implement a lot [...]
Building MariaDB 5.1 on Windows
+2 Vote Up -0Vote Down

Recently, I found myself needing MariaDB 5.1.60 for Windows for some testing purposes. Therefore, I needed to build it from source. I ended up using what I’d call a “blend” of the commands listed in this “how-to” and the readme file INSTALL-WIN-SOURCE, so I thought I’d post those steps.

  • Download 5.1.60 MariaDB source from here.
  • cd C:\mariadb-5.1
  • win\configure.js
  • cmake .
  • VS: File -> Open -> Solution -> MySql.sln
  • VS: Build -> Build Solution
  • VS: Right-click “PACKAGE” -> Build (in “Solution Explorer” View)

    That’s it.

    Let’s fire it up:

    MariaDB> select version();
    +----------------------+
    | version()            |
  •   [Read more...]
    Export a MySQL Table to a CSV File Methods Overview
    +1 Vote Up -2Vote Down

    A comma-separated values (CSV) file is a simple file format that is widely supported, so it is often used to move tabular data between different computer programs that support the format. CSV file is a text format for a database table. Each record in the table is one line of the text file. Each field value of a record is separated from the next with a comma. For example, a CSV file might be used to transfer information from a database to a spreadsheet or another database. Of course, there are more advanced formats to store data, for example, XML, but CSV does have one advantage over XML. CSV has much lower overhead, thereby using much less bandwidth and storage than XML.

    Now let’s analyse how one can save data from a MySQL table to a CSV file.


    The first

      [Read more...]
    Export a MySQL Table to a CSV File Methods Overview
    +0 Vote Up -0Vote Down
    In this article we describe benefits and shortcomings of different ways of exporting data from a MySQL table to the CSV format.
    What is this MySQL file used for?
    +7 Vote Up -0Vote Down

    MySQL keeps many different files, some contain real data, some contain meta data. Witch ones are important? Witch can your throw away?

    This is my attempt to create a quick reference of all the files used by MySQL, whats in them, what can you do if they are missing, what can you do with them.

    When I was working for Dell doing Linux support my first words to a customer where “DO YOU HAVE COMPLETE AND VERIFIED BACKUP?” Make one now before you think about doing anything I suggest here.

    You should always try to manage your data through a MySQL client.  If things have gone very bad this may not be possible. MySQL may not start. If your file system get corrupt you may have missing files. Sometimes people create other files in the MySQL directory (BAD).  This should help you understand what is safe to remove.

    Before you try to work with one of

      [Read more...]
    Showing entries 1 to 10 of 15 5 Older Entries

    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.