Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Question For Jason (or for any one at GT that knows what I'm talking about)

Quote Reply
Question For Jason (or for any one at GT that knows what I'm talking about)
Hi Jason,

I'm pretty sure you know the answer to this question...

In GForum's SQL.pm

For index creation you use the following naming structure:

# b,c,d,... correspond to the following:
#
# a - post_father_id
# c - cat_id
# d - session_date
# e - user_email
# f - forum_id | from_user_id_fk
and some others.....

Is this naming convention just for internal reference? I ask because, I do have plugin for NNTP forum mirroring that (in some cases) in order to find father posts it queries forum_id_fk and post_subject (it needs to do this, since
this is Usenet Newsgroups, so in cases I don't have a valid MessageID I need to resort to matching the subject. problem is...

That particular query is showing in the slow query log, and I want to create a new index (and force my plugin to use it) i just want to know if just creating the new index (modifying SQL.pm and re-creating the tables)
won't create any strange conflicts because of my newly created index letter :) I want to call it 'y' so the new index i create will be:

# custom:
p_fy => ['forum_id_fk', 'post_subject'],


and well.. the other question is: Do I need to 'force' the use of that index? I saw in Category.pm you do have a hack to force a specific MySQL index, but I don't know if this is a special case situation.
Maybe for me just creating the new index will do? the query showing (repeteadly) in slow-query is:

SELECT * FROM Post WHERE forum_id_fk = 'FORUM FOREING KEY' AND post_subject = 'SUBJECT GOES HERE';
Subject Author Views Date
Thread Question For Jason (or for any one at GT that knows what I'm talking about) jaltuve 3497 Nov 12, 2007, 8:27 PM
Thread Re: [jaltuve] Question For Jason (or for any one at GT that knows what I'm talking about)
brewt 3431 Nov 12, 2007, 11:24 PM
Thread Re: [brewt] Question For Jason (or for any one at GT that knows what I'm talking about)
jaltuve 3412 Nov 14, 2007, 1:06 PM
Thread Re: [jaltuve] Question For Jason (or for any one at GT that knows what I'm talking about)
brewt 3420 Nov 14, 2007, 1:28 PM
Post Re: [brewt] Question For Jason (or for any one at GT that knows what I'm talking about)
jaltuve 3441 Nov 14, 2007, 1:52 PM