When to use CSV storage engine for MySQL? -
from docs, states:
the csv storage engine stores info in text files using comma-separated values format.
what advantages of this? here can think of:
you can edit csv files using simple text editor (however, can export info usingselect outfile
) can imported spreadsheet programs lightweight , maybe improve performance (wild guess) what disadvantages?
no indexing cannot partitioned no transactions cannot have null valuesgranted (non-exhaustive) list of advantages , disadvantages, in practical scenarios should consider using csv storage engine on others?
i seldom utilize csv storage engine. 1 scenario have found useful, however, mass info imports.
create table columns matching input csv file. outside of mysql, using shell prompt,mv
csv file mysql info dictionary, overwriting .csv file belongs table created. alter table mytable engine=innodb
voilĂ ! one-step import of huge csv info file using ddl instead of insert or load data.
granted, it's less flexible insert or load data, because can't nulls or custom overrides of individual columns, or "replace" or "ignore" features handling duplicate values. if have input file want import, create import easy.
mysql csv storage-engines
No comments:
Post a Comment