From 349df7239fb2b33f26f8176d39a1bbf845e66506 Mon Sep 17 00:00:00 2001 From: Ross Trottier Date: Thu, 15 Aug 2024 09:24:24 -0600 Subject: [PATCH] optimized main query for post import --- gossamer_forums.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index cd353c8..ba612c0 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -946,7 +946,7 @@ class GossamerForumsImporter < ImportScripts::Base # Attachment example: highest_processed_post_id = 1359862 # Execute the query to get all posts ordered by post_id - execute_query("SELECT * FROM gforum_Post ORDER BY post_id").each do |row| + execute_query("SELECT post_id, user_id_fk, forum_id_fk, post_root_id, post_subject, post_time, post_message, post_likes, post_father_id, post_replies FROM gforum_Post ORDER BY post_id").each do |row| post_id = row['post_id'].to_i # Skip posts that have already been processed