distal-attribute
distal-attribute
distal-attribute
distal-attribute

MSSQL sys.partitions Crash

leo_paris posted 6 months ago in General
Hi,

MSSQL Version 8.0.760

On HeidiSql 8.1.0.4554 the count rows fonction was :
SELECT COUNT(*) FROM ."TABLE";
And worked.

Since HeidiSql 8.2...
it uses :
SELECT object_name(object_id) AS tablename, SUM(rows) AS rows
FROM sys.partitions
WHERE
index_id IN (0, 1)
AND object_name(object_id) IS NOT NULL
GROUP BY object_id
ORDER BY tablename

Witch may be faster but makes Crash HeidiSql on MSSQL 8.0.760

Will there be a workaround on this ?

Thanks !
ansgar posted 5 months ago
Ok, so if it's ok to use SELECT COUNT(*) on all versions then I would prefer to do so. Any performance issues on larger tables?
leo_paris posted 5 months ago
Hi,

Yes may be I did not run tests on Big tables for now.

But I thinks it's better to have a function witch works with all version for now.
Else You would need a table of versions with compliant fonctions ...

I'll try to run some test with count(*) on small to big tables and send you the results.
ansgar posted 5 months ago
Perfect. Thanks for your feedback!

Please login to leave a reply, or register at first.