Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tbl_sysinfo - "This table was created by PerfStatsAnalysis.sql" #159

Closed
gambit9009 opened this issue Apr 21, 2022 · 2 comments
Closed

tbl_sysinfo - "This table was created by PerfStatsAnalysis.sql" #159

gambit9009 opened this issue Apr 21, 2022 · 2 comments
Assignees
Labels
question/issue problem that really isn't a bug or hasn't found to be a bug, yet

Comments

@gambit9009
Copy link
Contributor

Look into this. Figure out why and probably delete it.

running...
select * from tbl_sysinfo

"This table was created by PerfStatsAnalysis.sql due to missing Perf Stats Script data."

That is the only row in the table.

@gambit9009 gambit9009 added the question/issue problem that really isn't a bug or hasn't found to be a bug, yet label Apr 21, 2022
@hacitandogan hacitandogan self-assigned this Nov 5, 2024
@hacitandogan
Copy link
Contributor

this is inserted in PerfstatsAnalysis.sql and inserting CPU count as 2

-- Compensate for missing sys.dm_os_sys_info in some very old perf stats script output.
IF OBJECT_ID('tbl_SYSINFO') IS NULL
BEGIN
CREATE TABLE [dbo].[tbl_SYSINFO]
(
tableinfo VARCHAR(128),
cpu_ticks BIGINT,
ms_ticks BIGINT,
cpu_count INT,
cpu_ticks_in_ms BIGINT,
hyperthread_ratio INT,
physical_memory_in_bytes BIGINT,
virtual_memory_in_bytes BIGINT,
bpool_committed INT,
bpool_commit_target INT,
bpool_visible INT,
stack_size_in_bytes INT,
os_quantum BIGINT,
os_error_code INT,
os_priority_class INT,
max_workers_count INT,
schedulers_count SMALLINT,
scheduler_total_count INT,
deadlock_monitor_serial_number INT
);
EXEC ('INSERT INTO dbo.tbl_SYSINFO (tableinfo, cpu_count)
VALUES (''This table was created by PerfStatsAnalysis.sql due to missing Perf Stats Script data.'', 2)');

But same value later used in a SPs so assuming 2 CPUs sounds very wrong here.

[dbo].[DataSet_WaitStats_WaitStatsTop5Categories]
DataSet_WaitStats_WaitStatsTopCategoriesOther

Changing the SPs to get CPU count from ;

SELECT TOP 1 [PropertyValue] FROM [dbo].[tbl_ServerProperties] WHERE PropertyName = 'cpu_count'

Then removing this legacy part and not creating this table.

@hacitandogan
Copy link
Contributor

fix is under #381 and will be merged, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question/issue problem that really isn't a bug or hasn't found to be a bug, yet
Projects
None yet
Development

No branches or pull requests

2 participants