Home » Other » General » Data Structure Optimization
Data Structure Optimization [message #292678] Wed, 09 January 2008 10:37 Go to next message
hdogg
Messages: 93
Registered: March 2007
Member
Here is my Table:
Table Name: Forecast

Row's
Batchid Forecast Period      Record
123      $45      31-DEC-08   1
123      $550     31-JAN-09   2
123      $70      28-FEB-09   3
123      $40      31-MAR-09   4
123      $704     30-APR-09   5
123      $7000    31-MAY-09   6
...
123      $300     31-DEC-10   24



Each forecast posts 24 records.

I've noticed this creates a ton of data... Is there a smarter more efficient way of doing this?
Re: Data Structure Optimization [message #292679 is a reply to message #292678] Wed, 09 January 2008 10:42 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No.

Regards
Michel
Re: Data Structure Optimization [message #292702 is a reply to message #292678] Wed, 09 January 2008 12:28 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
hdogg wrote on Wed, 09 January 2008 11:37

Here is my Table:
Table Name: Forecast

Row's
Batchid Forecast Period      Record
123      $45      31-DEC-08   1
123      $550     31-JAN-09   2
123      $70      28-FEB-09   3
123      $40      31-MAR-09   4
123      $704     30-APR-09   5
123      $7000    31-MAY-09   6
...
123      $300     31-DEC-10   24



Each forecast posts 24 records.

I've noticed this creates a ton of data... Is there a smarter more efficient way of doing this?



I don't understand your question at all. I see 24 record for a batch, not a forecast. it looks like consecutive months are created. If that's what's supposed to happen, why in the world would you want to break this? and what do you mean it created a ton of records? If 24 records are supposed to be created, then that's what it is.
Re: Data Structure Optimization [message #292943 is a reply to message #292702] Thu, 10 January 2008 04:02 Go to previous message
javon
Messages: 7
Registered: December 2007
Junior Member
I can't see anyway to reduce the number of rows.

However, you could reduce the number of columns.
Assuming that the a forecast is 24 records of consecutive months, then you don't really need both the PERIOD and RECORD columns.

You can:

1. Store the Forecast's "Start Month" in some other table, remove the PERIOD column and use the RECORD column to claculate (when needed) the month.

2. Remove the RECORD column and use the PERIOD when you want to sort the records.
Previous Topic: Creating dev db from prod
Next Topic: Geniuses, Help Me To Crack This "Big Sizes" Number Puzzle...
Goto Forum:
  


Current Time: Sat Dec 03 16:03:19 CST 2016

Total time taken to generate the page: 0.09083 seconds