I'm having some performance problems with queries looking like the
following:

SELECT DISTINCT p.poster_id AS has_posted, t.id, t.subject, t.poster,
t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views,
t.num_replies, t.closed, t.sticky, t.moved_to
FROM topics AS t
LEFT JOIN posts AS p
ON t.id=p.topic_id AND p.poster_id=2
WHERE t.id IN(3082, 2467, 3076, 3055, 3016, 3019, 2509, 2788, 2804, 2396,
2761, 2745)

The above query takes a full second to complete on my P3-450. The database
contains approx. 1200 topics and 8000 posts. All relevant columns have
indices (t.id, p.topic_id, p.poster_id). Do you believe there is a way to
speed it up?

-- 
Rickard Andersson
arpen_at_home_dot_se


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to