Much improved performance adding tracks
This commit is contained in:
parent
c1fae2f91a
commit
b2f826dfcc
@ -718,7 +718,11 @@ class Tracks(Base):
|
|||||||
"""Search case-insenstively for titles containing str"""
|
"""Search case-insenstively for titles containing str"""
|
||||||
return (
|
return (
|
||||||
session.execute(
|
session.execute(
|
||||||
select(cls).where(cls.title.like(f"{text}%")).order_by(cls.title)
|
select(cls)
|
||||||
|
.join(Playdates, isouter=True)
|
||||||
|
.where(cls.title.like(f"{text}%"))
|
||||||
|
.group_by(cls.title)
|
||||||
|
.order_by(cls.title)
|
||||||
)
|
)
|
||||||
.scalars()
|
.scalars()
|
||||||
.all()
|
.all()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user