I have a table with a column created_time
(DateTime) and a foreign_key i need to retrieve all the rows with x
foreign_key that the last row created with x
foreign_key was lets say over 2 minutes (and retrieve all the rows with that date)
My question: what is better for performance, to add a column that stores the last row created date every time i create a row, or to use a more complex query to retrieve those rows with the last row joined?