Ooo the sites set up to what i think is right… I hope it is… that would make things better for me.
I just need to figure out a better sleep schedule.
I wonder how easy this is going to be…
let me try something out:
<pre name="code" class="c-sharp"> ... some code here ... </pre>
SELECT
SUM(rows) as RowCount,
OBJECT_NAME(OBJECT_ID) as ObjectName,
FROM sys.Partitions
WHERE index_id in (0,1)
GROUP BY OBJECT_ID
wee… Note to self… be careful going between visual/html.
- Zielyn
*Edit… Forgot to add the where clause of index_id in (0,1) to make sure it only gets either heaps or the first index. Don’t need to count all the index partitions… that would just be silly.

Zielyn says:
Omg its a comment! Its working! Wee!
Thats crazy you can get an estimated row count from that simple query, and its reading from a static table… Just wish it wasn’t affected by the rows being locked in the table or even the entire table being locked that makes this count unavailable when bulk inserting/updating/deleting from the table.
“with (nolock)” only does so much justice v.v
27th January 2010 at 2:02 am