Jump to content

Table Occurence Relationship Speeds For Charting


cgroody

This topic is 2804 days old. Please don't post here. Open a new topic instead.

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.

Link to comment
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.

Link to comment
Share on other sites

This topic is 2804 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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