MySQL Forums
Forum List  »  Optimizer & Parser

Re: How to speed up the building of huge (>15 mln entries) normalized database?
Posted by: Rick James
Date: August 08, 2009 08:59PM

Consider letting MySQL do the work. Toss you cleaver hash table and memory watching; instead:

1. build a big table, Pairs, with 2 columns: word_id, sense_id. Use batched inserts or LOAD DATA.

2. Populate your real table via
INSERT INTO ...
SELECT word_id, sense_id, COUNT(*) FROM Pairs GROUP BY word_id, sense_id;

If your pairs start with quantities other than 1, the change the above to have 3 columns and use SUM().

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to speed up the building of huge (>15 mln entries) normalized database?
1797
August 08, 2009 08:59PM


Sorry, you can't reply to this topic. It has been closed.

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.