|
text
The term text describes a
datatype.
Like all
character datatypes,
the datatype text is also compatible to the
ANSI-standard.
The datatype text can store up to 2.147.483,647
bytes,
i.e. 2
GB
of data.
Usage of the datatype text
To save storage, all columns defined with the datatype text should be initialised with
NULL.
When initialising a text column with a value not equal to NULL, using
insert
or
update
commands,
ASE
initialises a text pointer and assigns the
value
one
page size,
which, depending on the ASE installation can be 2, 4, 8 or 16
KB.
A page size can have a storage capacity of maximum 1800 bytes.
If text data should be added or modified, without having to load vast text blocks into the transaction log,
the
writetext
command should be used. To read text data, the
readtext
command is available.See also:
patindex(),
textptr(),
and
textvalid().
The datatype text cannot be used with all functional features of ASE.
It is, for example, not suitable as value for a
parameter
for
stored procedures,
or as
local variable.
Additionally, it cannot be used as a parameter for
remote procedure calls (RPCs),
columns
defined with the datatype text should not be queried using
order by,
group by,
compute
or
union
clauses.
Also, do not
index
text columns.
Joins
or
subqueries
on columns with text datatype can have a negative effect on query performance.
This also holds true for
where
clauses, if the keyword
like
is not used. Moreover, text columns in a table are not suitable for queries using the
join operator +.
It should also be mentioned that the
Component Integration Services
(CIS) show differences to ASE in handling text datatypes.
See also:
char,
nchar,
varchar,
nvarchar,
unichar,
univarchar
and
Datatypes.
See also:
nchar, nvarchar, unichar(n), univarchar(n), varchar(n).
|