Jump to content
Sign in to follow this  
cgroody

Table Occurence Relationship Speeds For Charting

Recommended Posts

Not sure if this would be charting or relationship thread, so if I made the mistake I apologize. 

I have a basic questions about which relationship would be faster, or if there is a difference at all in my two ideas. I tried to explain this as best as possible so bear with me.

 

I have a table that is full of temperature readings. there is a temperature record for every second of the day.

I need to create a line chart that will display the temperatures over a large period of time. Using a Summary takes a long time when analyzing every second for a period of 2 months etc. So I came up with two solutions...

Solution 1

Create a 2 New Fields, IsForGraph (number, boolean) and GraphTemperature (number). Run a script that will take readings for every 10 minutes, and on one of those records IsForGraph is set to '1', and the Average Temp of those records is stored in GraphTemperature on the same record. Repeat for the rest of the Records, so at the end 1 record for every 10 minutes is marked with IsForGraph. Then I will have a Table Occurrence that uses the IsForGraph = 1 and only grabbing that data for displaying the chart (avoiding a summary, and only using indexed data)

Solution 2

Create a new table, with a Timestamp field, Temperature Field. Run a script that will take average temperature from readings for every 10 minutes, and create a record in the new table. Then use the new table to display the chart.

 

Basically curious if will my ToC in Solution 1 be slowed down because of the large number of records in the table, even though most records would not be related.

Share this post


Link to post
Share on other sites

I think solution 2 would be theoretically faster, but probably not by much, if your only criteria was the flag field. But you're also presumably going to search for a date range, and that would certainly be a faster Find in a separate table whose record count was smaller by an order of magnitude.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.