How teradata calculate number of row in a table?

Database

How teradata calculate number of row in a table?

Hi All,

 

When we submit the query:

SELECT COUNT(*) FROM Table_Name;

How terdata counts the rows?

I mean, does it have to move the data blocks from Disk to FSG? If yes, how can it be so fast even for large tables?

If no, how does it count then?

 

Thanks,

Sankalp

 

Tags (1)

Accepted Solutions
Highlighted
N/A

Re: How teradata calculate number of row in a table?

There's no need to read datablocks as the number of rows per datablock is stored in the Cylinder Index.

 

See http://www.nxtbook.com/nxtbooks/mspcomm/teradata_2011q2/index.php?startid=56

1 ACCEPTED SOLUTION
1 REPLY
Highlighted
N/A

Re: How teradata calculate number of row in a table?

There's no need to read datablocks as the number of rows per datablock is stored in the Cylinder Index.

 

See http://www.nxtbook.com/nxtbooks/mspcomm/teradata_2011q2/index.php?startid=56