Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Finding large historic granules

Geo SCADA Knowledge Base

Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Geo SCADA Knowledge Base
  • Finding large historic granules
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Labels
Top Labels
  • Alphabetical
  • database 32
  • Web Server and Client 31
  • WebX 19
  • Request Form 18
  • Lists, Events & Alarms 16
  • ViewX 15
  • Application Programming 12
  • Setup 12
  • Telemetry 8
  • Events & Alarms 7
  • Lists 7
  • Mimic Graphics 7
  • Downloads 6
  • Support 5
  • IoT 5
  • SCADA 5
  • Geo SCADA Expert 5
  • Drivers and Communications 4
  • Security 4
  • DNP 3 3
  • IEC 61131-3 Logic 3
  • Trends and Historian 2
  • Virtual ViewX 2
  • Geo Scada 1
  • ClearSCADA 1
  • Templates and Instances 1
  • Releases 1
  • Maps and GIS 1
  • Mobile 1
  • Architectures 1
  • Tools & Resources 1
  • Privacy Policy 1
  • OPC-UA 1
  • Previous
  • 1 of 4
  • Next
Latest Blog Posts
  • OPC UA - Driver and Server
  • Requirements for Generating a Valid OPC UA Server Certificate
  • Load Events Using LoadRecord and LoadRecords
  • Geo SCADA Embedded Component Licenses
  • Geo SCADA 2023 Known Issues
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Anonymous user
Not applicable
‎2021-06-09 04:01 PM
0 Likes
0
1198
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2021-06-09 04:01 PM

Finding large historic granules

Originally published on Geo SCADA Knowledge Base by Anonymous user | June 10, 2021 01:01 AM

📖 Home  Back  
Geo SCADA Expert is designed to handle individual historic files (granules) that load quickly from storage (see the online help article "Operational Limitations - Server"). Slow file loads may cause extended database locking when the historic granules are loaded, particularly on slower media such as magnetic disks.

Where possible, large granules should be identified and the cause of the abnormally high historic storage rate rectified. It may be advisable to remove the affected granules from the system to prevent performance degradation when searching, although this usually requires a server to be stopped and started. An alternative approach for events, alarm summary or configuration change log is to alter the stream size, although changing those may require significant downtime.

The largest granule for each stream can be seen at a glance in the Server Status tool or DBSnapshot in the Historic/Historian page, check the Largest File column.

This article covers a few further approaches to identifying large historic granules.

SQL Query

These queries will list the granule sizes and file locations ordered by size.
The queries select data from the historic index tables CDBHISTORICFILE and CDBEVENTFILE without having to load the granules themselves. However, if your historic data configuration includes use of the 'Index After' feature, then executing this query for historic data files will cause enumeration and indexing of files which may affect performance. In that case you may wish to perform the query on a backup or standby server.

Find large historic granules in the Raw Historic stream.

select top (10) f.stream, f.RecordCount, f.StartTime, 
'History\Historic\HdI' || formatvalue( f.stream/256 using '00000') || '\' || formatvalue( f.stream using '00000') || '\WK' || formatvalue( f.granule using '000000') || '.HRD' as filename
from cdbeventfile f
order by f.RecordCount desc


Find large historic granules in the Event stream.

select top (10) f.stream, f.RecordCount, f.StartTime, 
'Journal\JnJ' || formatvalue( f.stream using '00000') || '\H' || formatvalue( f.granule using '0000000') || '.MWJ' as filename
from cdbeventfile f
order by f.RecordCount desc

 

Locating the large streams of events is useful because a stream contains the events from a range of database item IDs. Geo SCADA also has a feature which counts and alarms on the number of events in a stream and for an item. Search the Help for "Define the Acceptable Limits for Historic Data Files".


To analyze the distribution of event files per stream:

SELECT MIN( STREAM ) AS "STREAM No.", COUNT( RECORDCOUNT ) AS "TotalFiles", SUM( RECORDCOUNT ) AS "TotalRecords", 
SUM( CASE WHEN RECORDCOUNT > 7500 THEN 1 ELSE 0 END ) AS "7500 plus",
SUM( CASE WHEN RECORDCOUNT > 15000 THEN 1 ELSE 0 END ) AS "15000 plus",
SUM( CASE WHEN RECORDCOUNT > 30000 THEN 1 ELSE 0 END ) AS "30000 plus",
SUM( CASE WHEN RECORDCOUNT > 60000 THEN 1 ELSE 0 END ) AS "60000 plus"
FROM CDBEVENTFILE GROUP BY STREAM ORDER BY "STREAM No." ASC


To analyze the distribution of event files over time (day base):

SELECT MIN( FORMATVALUE( STARTTIME USING 'YYYY-MM-dd' ) ) AS "Date", COUNT( RECORDCOUNT ) AS "TotalFiles", 
SUM( RECORDCOUNT ) AS "TotalRecords",
SUM( CASE WHEN RECORDCOUNT > 7500 THEN 1 ELSE 0 END ) AS ">7500",
SUM( CASE WHEN RECORDCOUNT > 15000 THEN 1 ELSE 0 END ) AS ">15000",
SUM( CASE WHEN RECORDCOUNT > 30000 THEN 1 ELSE 0 END ) AS ">30000",
SUM( CASE WHEN RECORDCOUNT > 60000 THEN 1 ELSE 0 END ) AS ">60000"
FROM CDBEVENTFILE
GROUP BY FORMATVALUE( STARTTIME USING 'YYYY-MM-dd' )
ORDER BY "Date" ASC


"DIR /s"

"DIR /s" can be used to achieve similar results. Use the "DIR /s" command from the root of the historic folders and pipe the output to files.


This could be searched to identify large files.

Go: Home Back

Author

Biography

Anonymous user

Link copied. Please paste this link to share this article on your social media post.

  • Back to Blog
  • Newer Article
  • Older Article
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of