What are search_index & search_dataset tables for, can I clean them? I am trying to dump sql from local dev site to production server, I found that search_index &amp; search_dataset these two tables are big, made the sql file really big.

I am guessing these two tables are about storing search indexes which I can always to re-index from scratch later. Correct me if wrong.

So is it OK/safe to delete all the records of them?  then export the database, import to my server. By doing this I can reduce the file size of dump file. 

Thanks!
These tables are used by the site's search function, as provided by the core's Search module. They're built from your site's content, and the descriptions in code in search_schema() say:


search_dataset - "Stores items that will be searched"
search_index - "Stores the search index, associating words, items and scores"


Though you can ignore/truncate the contents of these tables to keep your database dumps smaller, they will be recreated during cron runs as your site's content is re-indexed. Beware that rebuild times can be a lengthy if your site has a lot of content.

I've always found the Backup and Migrate module to be much handier than command-line MySQL as tables and/or their contents can be ignored, plus do scheduled dumps and  have various export/import profiles.