Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [mcoyne] Can't call method "fetchrow_hashref"

Quote Reply
Re: [mcoyne] Can't call method "fetchrow_hashref" In reply to
It's not something that should happen again - basically, there's an index that has, for some reason that elludes me, failed to exist on several systems.

p_rfl is an index on the Post table ("p") on the columns post_root_id, forum_id_fk, post_latest_reply - it's used to sort the threads on the forum view page - they all have root id 0, since they are the root (non root posts have a root id that contains the post_id of the root post), forum_id_fk contains the forum_id, obviously, and post_latest_reply contains the latest reply of a post decendent (for a root post, the latest reply in the thread - but this information is known for every post in the post tree). As an optimization, we force MySQL to use that index, instead of what its optimizer thinks is right (because in this case, the optimizer usually gets it wrong). The problem is that explicitely specifying an index requires it to be there - and some installations for some reason don't have the index Pirate.

That query adds the index.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Subject Author Views Date
Thread Can't call method "fetchrow_hashref" mcoyne 2919 Nov 20, 2002, 1:45 PM
Thread Re: [mcoyne] Can't call method "fetchrow_hashref"
yogi 2861 Nov 20, 2002, 1:50 PM
Thread Re: [yogi] Can't call method "fetchrow_hashref"
mcoyne 2872 Nov 20, 2002, 3:02 PM
Thread Re: [mcoyne] Can't call method "fetchrow_hashref"
Jagerman 2847 Nov 20, 2002, 4:01 PM
Post Re: [Jagerman] Can't call method "fetchrow_hashref"
mcoyne 2819 Nov 25, 2002, 11:25 AM
Post Re: [mcoyne] Can't call method "fetchrow_hashref"
Jagerman 2855 Nov 20, 2002, 1:52 PM