Optimise threads.json SQL query.
This commit is contained in:
parent
6e32ec27b4
commit
e62ae672b3
1 changed files with 4 additions and 4 deletions
|
|
@ -839,10 +839,10 @@ routes:
|
||||||
from thread t, category c, person u
|
from thread t, category c, person u
|
||||||
where t.isDeleted = 0 and category = c.id and $#
|
where t.isDeleted = 0 and category = c.id and $#
|
||||||
u.status <> 'Spammer' and u.status <> 'Troll' and
|
u.status <> 'Spammer' and u.status <> 'Troll' and
|
||||||
u.id in (
|
u.id = (
|
||||||
select u.id from post p, person u
|
select p.author from post p
|
||||||
where p.author = u.id and p.thread = t.id
|
where p.thread = t.id
|
||||||
order by u.id
|
order by p.author
|
||||||
limit 1
|
limit 1
|
||||||
)
|
)
|
||||||
order by modified desc limit ?, ?;"""
|
order by modified desc limit ?, ?;"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue