[wp-trac] Re: [WordPress Trac] #8999: Completely New LiveJournal Importer

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 9 17:40:13 GMT 2009


#8999: Completely New LiveJournal Importer
-------------------------------------+--------------------------------------
 Reporter:  beaulebens               |        Owner:          
     Type:  task (blessed)           |       Status:  reopened
 Priority:  normal                   |    Milestone:  2.8     
Component:  Import                   |      Version:  2.7     
 Severity:  normal                   |   Resolution:          
 Keywords:  needs-testing has-patch  |  
-------------------------------------+--------------------------------------
Comment (by beaulebens):

 Replying to [comment:39 westi]:
 > Cool. Although 6 hours is a little long ;-)

 It sure is :-/

 > What are the extra fields you are using.

 I'm trying to maintain threading information from LiveJournal, so I'm
 using comment_type='livejournal' to indicate which comments we're dealing
 with, then comment_karma holds the comment's LiveJournal ID, and
 comment_agent holds the parentid for threading (again, this is
 LiveJournal's ID). I loop back over the table WHERE
 comment_type='livejournal' and update the comment_parent field using a
 lookup to translate the LJ ID to the new WP ID.

 > Is there any reason why they couldn't just be indexed anyway?

 It seems extraneous to index these fields under any normal condition
 (except for perhaps comment_type). More indexes = slower inserts/updates
 and wp_comments is already pretty heavily indexed.

 > I think we should go with the speediest solution - people won't want to
 wait 6 hours for there import to complete!

 That's what I was hoping you'd say :) It's literally going to be 3 ADD
 INDEX commands, then reverting them with 3 DROP INDEXs, so it shouldn't
 affect anything external. I'll put it in and run a test to confirm
 numbers.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8999#comment:40>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list