Den 23-08-2013 01:27, A B skrev:
So, how could I do that?

One way would be to edit the first part of the sql file which creates the table before using it.

Another way which gives better control would be to write your own program to parse the sql file and insert the data into the database. See http://toolserver.org/~byrial/wikidata-programs/read_page_table.c for an example of that. The program only inserts some of the columns into the table, and also only selected rows depending on the namespace.

Reagrds,
- Byrial

El 23/08/2013, a les 1:16, Byrial Jensen <byr...@vip.cybercity.dk> va escriure:

Den 23-08-2013 00:54, A B skrev:
I'm trying to install enwiki-20130503-page.sql into an empty database and the 
process is too slow (it takes days), so I think it isn't normal. What I do is:

1. Installing tables.sql
2. Executing a script to disable foreign key checks
3. Installing enwiki-20130503-page.sq (mysql -u <usr> -p<pwd> enwiki <  
enwiki-20130503-page.sql &).

I don't know if the problem can be my MySQL configuration:

Any idea?

I don't know about the configuration, but I would first read all rows into a table 
without any keys at all, and then create the keys I need afterwards. It is much faster to 
do the necessary sorting once instead of updating the keys for each inserted row. It is 
not enough to an "alter table page disable keys" because unique keys will still 
be updated and checked for uniqueness at each inserted row.

Regards,
- Byrial



_______________________________________________
Xmldatadumps-l mailing list
Xmldatadumps-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/xmldatadumps-l

Reply via email to