How to Improve a MySQL Query on a 1 Million Record Table -


i have 1 million record mysql table 7 columns. have primary key , fulltext index column. table stands dictionary (size on disk ~300 mb).

the columns are:

    'id', 'int(11)', 'no', 'pri', null, 'auto_increment'     'writtenform', 'varchar(255)' - fulltext index     'languageidentifier', 'varchar(255)'     'partofspeech', 'varchar(255)'     '_index', 'int(11)'     'writtentext', 'longtext'     'lexiconid', 'varchar(255)' 

when run query:

select * tablename writtenform = 'herstellen' 

i results in 4,5 seconds. me way much, table simple, query has no joins , run locally on pc.

i have noticed fulltext index has no collation. might problem? if yes, please let me know how add collation index.

i have noticed alteration bring table (add column, drop column) takes more 5 minutes (last column drop took around 15).

since you're using = , not fulltext search, you:

a) remove fulltext index , replace regular index

or

b) add regular index alongside fulltext index

i suspect query doing full table scan , not using fulltext index because you're not doing match fulltext search


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -