Home Applications GoSelector

GoSelector

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
4
1 reviews
0
Awards
155
Views
5
IPM installs
0
0
Details
Releases  (2)
Reviews  (1)
Issues
Pull requests  (1)
See Column Selectivity Vs Ratio of Distinct Values

What's new in this version

Republish for ZPM with Module Resource and source in UDL format

GoSelector

Database Column Selectivity is used as a guide by SQL Engine to influence choice of indexes for queries.
Implemented values maybe have already been added to distributed code for example by:

Do $SYSTEM.SQL.Stats.Table.SetFieldSelectivity("TEST","PropertyLen2","T1","5.1%")

Affects class storage definition adding:

<Property name="T1">
<Selectivity>5.1%</Selectivity>
</Property>

This scheduled Task:

  • Does NOT modify Table / Class definitions
  • Extracts existing column selectivity values found in an environment
  • Profiles corresponding data values
  • Generates a report of Column implemented selectivity versus actual ratio of distinct values
  • Is not intended to replace or compete with other utilities

Can Use Task Schedule Output file option to create report file.

set task=##class(alwo.GoSelector).%New()
set task.ClassNamePattern="1""TEST."".E"
do task.OnTask()
Classname SQL_TableName Property SQL_FieldName Code_Selectivity RecordCount Count_DistinctValues Calculated_Ratio
TEST.PropertyLen TEST.PropertyLen Def Def 2.5% 3 3 33.33%
TEST.PropertyLen2 TEST.PropertyLen2 T1 T1 5.1% 7 6 16.67%
TEST.PropertyLen2 TEST.PropertyLen2 T2 T2 5.2% 7 5 20.00%
TEST.PropertyLen2 TEST.PropertyLen2 T3 T3 5.3% 7 4 25.00%
TEST.PropertyLen2 TEST.PropertyLen2 T4 T4 5.4% 7 3 33.33%
TEST.PropertyLen2 TEST.PropertyLen2 T5 T5 5.5% 7 3 33.33%

Hope this utility may inspire reuse for other developer reporting needs.

Made with
Install
zpm install alwo-goselector download archive
Version
1.0.114 Oct, 2022
Category
Developer Environment
Works with
InterSystems IRISInterSystems IRIS for HealthHealthShareTrakCare
First published
12 Oct, 2022