1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Converted query trouble

Discussion in 'XenForo Development Discussions' started by gordy, Apr 12, 2011.

  1. gordy

    gordy Well-Known Member

    Can any database guru's understand why this query is failing (I eventually have to kill the process)
    SELECT  xf_attachment.attachment_id, xf_thread.thread_id, xf_thread.title
    FROM xf_thread
    LEFT JOIN xf_attachment as xf_attachment
    ON(xf_attachment.data_id = xf_thread.first_post_id)
    WHERE xf_thread.thread_id
    AND node_id = 5
    GROUP BY xf_thread.thread_id
    ORDER BY thread_id
    DESC LIMIT 15;
    It is based of my vB query which runs as a snap, less than a second
    SELECT  attachment.attachmentid, thread.threadid, thread.title
    FROM thread
    LEFT JOIN attachment as attachment
    ON(attachment.postid = thread.firstpostid)
    WHERE thread.threadid
    AND forumid = 22
    GROUP BY thread.threadid
    ORDER BY threadid
    DESC LIMIT 15;
    I have this cron'd to dump out to a static file every hour

Share This Page