MSSQL sys.partitions Crash

leo_paris posted 1 year ago in General

MSSQL Version 8.0.760

On HeidiSql the count rows fonction was :
And worked.

Since HeidiSql 8.2...
it uses :
SELECT object_name(object_id) AS tablename, SUM(rows) AS rows
FROM sys.partitions
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 11 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 11 months ago

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 11 months ago
Perfect. Thanks for your feedback!
slestak989 posted 1 week ago

ansgar wrote: Perfect. Thanks for your feedback!


Do you know if this was ever schedule to be implemented?
Unfortunately, I an still using MSSQL2000 and I hit this issue frequently.


Steve Romanow

ansgar posted 1 week ago
Should be finally fixed in r4941, by falling back to SELECT COUNT(*) on MSSQL 2000.
slestak989 posted 5 days ago
Close but getting a different exception.

/* SQL Error (170): Cannot use empty object or column names. Use a single space if necessary
Line 1: Incorrect syntax near ''. */
ansgar posted 5 days ago
For me that worked, but it seems that MSSQL 2k wants the database name, not the schema name here. Should be fixed in r4942.

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