Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Table Occurence Relationship Speeds For Charting

Featured Replies

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.

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.