Salve ragazzi,
ho due tabelle semplici:
posts: id, title, timestamp
posts_relationship: id, post_id, subcategory_id
Una che raccoglie i post e una che fa da raccordo tra i post e le categorie.
Voglio raccogliere esclusivamente i post di una categoria ordinati per data:
La query mi crea:codice:SELECT posts.title FROM posts_relationship INNER JOIN posts ON posts.id = posts_relationship.post_id WHERE posts_relationship.subcategory_id = 21 ORDER BY posts.timestamp DESC LIMIT 0,50
Premetto che ho messo gli indici a praticamente tutti i campi, essendo pochi ma essendo tutti chiamati. Cosa sbaglio?codice:Using temporary; Using filesort

Rispondi quotando