All Forums Database
viswa08 1 post Joined 01/10
16 Jan 2010
How to find blocksize of a able in teradata?

Hi All,I am newbie to teradata and looking for finding blocksize of a table,i had knoweldge abt ferret utility but it does not give me exactly what I am looking for .rgds,Viswa

teradata_dba 42 posts Joined 01/09
16 Jan 2010

Hi Vishwa,Blocksize in teradata is defined in terms of sectors in dbs control parameter.I think it is Permdballocation ( just refer to the dbs control portion in the doc). for example if u see the above relevant parameter defines as 256 sectors the 256*512bytes= bytes and divide that by 1024 will give u the block size. This is system wide.Also in teradata u can over rule this system wide block size value by allocating it at the time of creating a table. So u can create mutiple tables with diff blocksizes...regardsTERADATA_DBA

teradata_dba

vipenkoul 8 posts Joined 02/10
18 Feb 2010

I am a newbie in Teradata.Does it make any difference in initial size if a table is just created with one column VS multiple columns and does not contain any data?Thanks

pawan0608 97 posts Joined 12/07
19 Feb 2010

No, there is no difference, as Teradata doesn't pre-allocate any data blocks for table, it acquires data blocks for tables when, it actually needs to insert data into table. I couldn’t remember exactly, but I think, it is slightly different from Oracle, where we can assign some initial blocks (or INITIAL or Segment) at the time of table creation.

vipenkoul 8 posts Joined 02/10
19 Feb 2010

Thanks for your valueable answer.Does TRUNCATE or similar command in Teradata has the same effect?What I mean is if given the 3 scenarios1. I create a table fresh with one columnOR2. I create a table fresh with several columnsOR3. I reset the highwater mark of a table by issuing a truncate or a similar command on a table which was previously filled with dataQ : Does the size of table would remain same in 3rd scenario too? (If I am not wrong you have already answered the scenario 1 & 2).Your answer would be appericated.Thanks

Jim Chapman 449 posts Joined 09/04
19 Feb 2010

Teradata does not have a TRUNCATE statement or any notion of a "highwater mark", but you may delete a table's entire contents using the DELETE statement without any WHERE condition. The resulting disk space usage would be the same as in the case of a freshly created empty table.

vipenkoul 8 posts Joined 02/10
19 Feb 2010

Thanks for your reply.That's very good to know.

You must sign in to leave a comment.