I have a table and query that looks up previous records in. It works, but its really slow. Any suggestions to speed it up?
Table t_detail fields:
id date stock qty brand
1 1/1/2008 1 1 A
2 1/2/2008 2 2 B
3 1/3/2008 3 3 A
the records of interest are not adjacent rows, so a select is needed to...