Red Gate forums :: View topic - Row count
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Doc 2
SQL Doc 2 forum

Row count

Search in SQL Doc 2 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
George Palacean



Joined: 14 Jan 2009
Posts: 19

PostPosted: Wed Jan 14, 2009 3:45 pm    Post subject: Row count Reply with quote

I noticed that to get the number of rows in a table, SQL Doc runs select count_big (*) from table_name; but that's very slow for large tables and puts huge load on the database, not talking about locking (I think that's the reason it stops after 30 seconds or so...).

Instead, is it possible to take them from the sys.dm_db_partition_stats view (at least for SQL Server 2005 and 2008)? That's how Microsoft's sp_spaceused procedure works, and it's instantaneous.

It would also be very good to have the number of rows for each table on the 'Tables' page (where the list of all tables in the database is), together with their size and/or other info - the page looks too empty and useless now.

Thanks,
George
Back to top
View user's profile Send private message
alex.weatherall



Joined: 29 Nov 2005
Posts: 42

PostPosted: Thu Jan 15, 2009 5:04 pm    Post subject: Reply with quote

The only thing I would say about including row count value on the tables page is that this information should be optional on the tables list (and the table page for that matter ) - like the SQL Script option.

The reason for this is that some users of SQL Doc are using your product to document databases that have many production instances (e.g. a database that's part of a product rather than in-house database). In these situations rowcount is not relevant (and the documentation is usually generated on non-production databases anyway - so the rowcount is of test or dev data.)

Totally agree about not using count_big(*) for the rowcount. Then again I don't run SQL Doc against a production database.

Thanks,

Alex
Back to top
View user's profile Send private message
Linda Hawksworth



Joined: 25 Jun 2007
Posts: 192

PostPosted: Wed Mar 25, 2009 11:27 am    Post subject: Reply with quote

The ability to turn off the row count altogether or modify how it is calculated has already bene logged as a feature request in our tracking system and will be considered for the next release of SQL Doc although we have no timescales for this at present.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group