Thanks Pablo

My current solution does exactly that and as you say ... it works

The realworld problem I have makes it unusable for some of my graphs.

Imagine this - I have timestamps of my data in 10 millisecond increments.
I would like to draw to "events" on the same graph - they could be hours or even days apart.

This would mean creating millions of records in the temp table (8 640 000 10 millisecond intervals in a day ...).

It works ok where my data is timestamped in days or 10minute intervals.