2014-04-13 12 views

risposta

4
SELECT * FROM events WHERE age(now(), created_at) < '15 minutes'; 
+5

Questo non si può utilizzare un indice su created_at. –

30
SELECT created_at FROM events WHERE created_at > NOW() - INTERVAL '15 minutes';