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
|
||||
where t.isDeleted = 0 and category = c.id and $#
|
||||
u.status <> 'Spammer' and u.status <> 'Troll' and
|
||||
u.id in (
|
||||
select u.id from post p, person u
|
||||
where p.author = u.id and p.thread = t.id
|
||||
order by u.id
|
||||
u.id = (
|
||||
select p.author from post p
|
||||
where p.thread = t.id
|
||||
order by p.author
|
||||
limit 1
|
||||
)
|
||||
order by modified desc limit ?, ?;"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue