I would explore some database indexes. Is that publish date column
indexed in any way?
I've seen MySQL batch scripts drop from 30 mins plus to a minute or
two with the right index, it's worth looking into.
James
--~--~-~--~~~---~--~~
You received this message beca
Hello,
I would like to retrieve the most recently published story from the
database. The criterion date is not a field, but sits in a separate
model connected by a ManyToMany field.
# this works fine
latest_story = Story.order_by('-publish_dates__publish_date')[0]
# this also works, seems sligh
2 matches
Mail list logo