Posted by David Portas on 11/29/05 13:16
Steve wrote:
> I am trying to develop a stored procedure for an existing application that
> has data stored in numerous tables, each with the same set of columns. The
> main columns are Time and Value. There are literally hundreds of these
> tables that are storing values at one minute intervals. I need to calculate
> the value at the end of the current hour for any table. I am a little new
> to SQL Server, but I have some experience with other RDBMS.
>
Just to emphasise what Steve Jorgensen said: this sounds like a crazy
design. If you are forced to support hundreds of tables like this then
you might consider creating some indexed views so that you don't have
to implement a lot of dynamic code. Take a look at the indexed views
topic in Books Online.
If on the other hand these hundreds of identical tables are somehow
being created dynamically at runtime then I be much more hesitant about
going further. I don't know your system or what it does of course.
However I'm pretty sure that if confronted with that problem I would
first write to management in the strongest terms that such an
architecture is unsustainable and needs to be terminated rather than
supported.
--
David Portas
SQL Server MVP
--
Navigation:
[Reply to this message]
|