in reply to (OT) Dearest Monks - Mysql Question - Compare current insert record with last record inserted.

Is the program running once every five minutes, i.e. via cron or some such, or does it run continuously and check for online data every 5 minutes? I suspect the former; if the latter the program could just keep the last price in memory.

If your database is huge and slow, there might be less overhead in opening and reading a file for the data. There are various modules for this on CPAN.

But the biggest question I have is WHY? If I understand correctly, you're proposing to store on row 2 a calculation based on field X on row 1 and 2. Why store what can easily be calculated?

  • Comment on Re: (OT) Dearest Monks - Mysql Question - Compare current insert record with last record inserted.