Length of TOKEN_INFO column
Could someone please confirm the maximum length of the token_info column. It used to be 4k, but I think that's changed.
I want to write a procedure to calculate fragmentation that isn't quite as lengthy to run as ctx_report.index_stats.
Thanks.
The token_info column of the dr$...$i table is a blob, so once again any limitations depend upon how you display it. I provided an example below. Can you provide a little more detail about what you are trying to do and how?
SCOTT@10gXE> CREATE TABLE test_tab (test_col VARCHAR2 (30))
2 /
Table created.
SCOTT@10gXE> INSERT ALL
2 INTO test_tab VALUES ('test1')
3 INTO test_tab VALUES ('test2')
4 INTO test_tab VALUES ('test3')
5 SELECT * FROM DUAL
6 /
3 rows created.
SCOTT@10gXE> CREATE INDEX test_idx ON test_tab (test_col)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 /
Index created.
SCOTT@10gXE> DESC dr$test_idx$i
Name Null? Type
TOKEN_TEXT NOT NULL VARCHAR2(64)
TOKEN_TYPE NOT NULL NUMBER(3)
TOKEN_FIRST NOT NULL NUMBER(10)
TOKEN_LAST NOT NULL NUMBER(10)
TOKEN_COUNT NOT NULL NUMBER(10)
TOKEN_INFO BLOB
SCOTT@10gXE> SELECT token_text, token_type FROM dr$test_idx$i
2 /
TOKEN_TEXT TOKEN_TYPE
TEST1 0
TEST2 0
TEST3 0
SCOTT@10gXE> SELECT CTX_REPORT.TOKEN_INFO ('test_idx', 'test2', 0)
2 FROM DUAL
3 /
CTX_REPORT.TOKEN_INFO('TEST_IDX','TEST2',0)
===========================================================================
TOKEN INFO FOR TEST2 (0:TEXT)
===========================================================================
index: "SCOTT"."TEST_IDX"
base table: "SCOTT"."TEST_TAB"
$I table: "SCOTT"."DR$TEST_IDX$I"
ROW 1 ($I ROWID AAANCWAABAAAKu6AAB)
DOCID COUNT: 1 FIRST: 2 LAST: 2
DOCID: 2 (AAANCUAABAAAKuiAAB) BYTE: 1 LENGTH: 3 FREQ: 1
AT POSITIONS: 1
===========================================================================
TOKEN STATISTICS
===========================================================================
Total $I rows: 1
Total docids: 1
Total occurrences: 1
Total token_info size: 3
Total garbage size: 0 (0.00%)
Optimal $I rows: 1
Row fragmentation: 0.00%
MIN MAX AVERAGE
Docids per $I row : 1 1 1.00
Bytes per $I row : 3 3 3.00
Occurrences per docid : 1 1 1.00
Bytes per docid : 3 3 3.00
Occ bytes per docid : 1 1 1.00
SCOTT@10gXE> VARIABLE g_ref REFCURSOR
SCOTT@10gXE> DECLARE
2 v_clob CLOB;
3 BEGIN
4 CTX_REPORT.INDEX_STATS ('test_idx', v_clob);
5 OPEN :g_ref FOR SELECT v_clob FROM DUAL;
6 END;
7 /
PL/SQL procedure successfully completed.
SCOTT@10gXE> PRINT g_ref
:B1
===========================================================================
STATISTICS FOR "SCOTT"."TEST_IDX"
===========================================================================
indexed documents: 3
allocated docids: 3
$I rows: 3
TOKEN STATISTICS
unique tokens: 3
average $I rows per token: 1.00
tokens with most $I rows:
TEST3 (0:TEXT) 1
TEST2 (0:TEXT) 1
TEST1 (0:TEXT) 1
average size per token: 3
tokens with largest size:
TEST3 (0:TEXT) 3
TEST2 (0:TEXT) 3
TEST1 (0:TEXT) 3
average frequency per token: 1.00
most frequent tokens:
TEST3 (0:TEXT) 1
TEST2 (0:TEXT) 1
TEST1 (0:TEXT) 1
token statistics by type:
token type: 0:TEXT
unique tokens: 3
total rows: 3
average rows: 1.00
total size: 9
average size: 3
average frequency: 1.00
most frequent tokens:
TEST3 1
TEST2 1
TEST1 1
FRAGMENTATION STATISTICS
total size of $I data: 9
$I rows: 3
estimated $I rows if optimal: 3
estimated row fragmentation: 0 %
garbage docids: 0
estimated garbage size: 0
most fragmented tokens:
TEST3 (0:TEXT) 0 %
TEST2 (0:TEXT) 0 %
TEST1 (0:TEXT) 0 %
SCOTT@10gXE>
Similar Messages
-
How to retreive the max data length of a column
Hello All,
I know how to do a select to get the max data length of a column it is this :
SELECT MAX(LENGTH(COLUMN_NAME) FROM table.
However, I need this information combined with my SQL that returns the Data_type and length from the USER_TAB_COLUMNS. So taking the emp example if the ename column was 50 as VARCHAR2 but the max data entered in it was just 20 I want the information like this:
SELECT COLUMN_NAME, DATA_LENGTH, and the Max length of 20
FROM USER_TAB_COLUMNS WHERE TABLE_NAME='EMP';
I don't know how to get the Max Length of the Column in this table. Can anyone suggest me a hint? An Inline view maybe?
ThanksStill not sure about your requirements, but how about this
SQL> CREATE OR REPLACE FUNCTION get_max_length(p_table in varchar2, p_col in varchar2) return pls_integer
2 is
3 v_cnt pls_integer;
4 begin
5 execute immediate 'select max(length('||p_col||')) from '||p_table into v_cnt;
6 return v_cnt;
7 end get_max_length;
8 /
Function created.
SQL>
SQL> SELECT COLUMN_NAME,
2 DATA_LENGTH,
3 get_max_length(TABLE_NAME, COLUMN_NAME) max_length
4 FROM USER_TAB_COLUMNS
5 WHERE TABLE_NAME='EMP'
6 AND DATA_TYPE like '%CHAR%'
7 ;
COLUMN_NAME DATA_LENGTH MAX_LENGTH
ENAME 10 6
JOB 9 9
SQL> -
Is their any function in sql to identify datatype and length of each column
Hi
i need to identify datatype and length of each column in a table by using SQL query.
plz assist me reagard the same.
thanksTry this:
SELECT column_name,
data_type,
data_length,
data_precision
FROM user_tab_columns
WHERE table_name = <table_name> -
Modifying the length of a column list
Hi,
I need to maintain a MOSS 2007 site. It has an existing list with some columns to update. I need to reduce the length of these columns. Can I accomplish this operation with no impact on list data_
Fe, could I have a data truncation respect to these list columns?
Many thanksHi,
I seem to have been clear. I need to reduce the lenght of some list columns, thus to reduce the number of characters. The list is already existing and has some thousands of items.
In order to run a proof, I've modified the length (number of characters) of only one list column and then I've set the original length: the data saved inside the columns hasn't been truncated. So, I've noticed that setting the length of a list
column inside MOSS 2007 doesn't modify the pre-existing value, because doesn't modify the length of the corresponding column in the content database. Changing the lenght of a column affects only the input data operation in the MOSS list.
Bye -
Printing some fixed length of a column in a report output
Dear All,
In the output of my ALV report, I am having one column as "TEXT" which is of length 500 characters. But I want that while I am displaying that value in the system then I should be able to see the complete 500 characters but while printing that column only first 100 characters of the column should be printed.
There are other columns in the report which should be displayed and printed as it is.
Kindly guide me in how this can be done.
Wam Regards,
N.Jainhi,
it is LVC fieldcat or SLIS.?
better go for LVC.
u try doing like this.
data : reserve_lines type lvc_s_prnt.
reserve_lines-RESERVELNS = 100.
iam not sure but try doing like that -
How do I determine the length of a column?
Does anyone know how to determine the length of an Oracle column through sql statements? I know in SQL Server you can use the COL_LENGTH function to find the maximum length for a particular column, but I haven't been able to find an equivalent for Oracle.
We have a column in a database that is a VARCHAR2 and can be any szie from 64 to 255 characters. I need to determine on the fly from a running client application what size the column is in the current database.
Thank you very much for any help you can give me.select data_length from user_tab_columns
where table_name='YOUR_TABLE' and column_name='YOUR_COLUMN';
if you want function to return this value, create function like below..
create or replace function col_len(t varchar2,c varchar2)
return number is
n number;
begin
select data_length into n from user_tab_columns
where table_name=upper(t) and column_name=upper(c);
return n;
exception
when others then
return 0;
end;
/ -
How do I change the length of a column in the metadata?
A very simple package, reads data from SQL Server and FTPs it to a destination. I have zero experience with SSIS.
I had to add a new column (HEA_ID) to the input and output. The output record has a filler at the end (I hope you know what a filler is) and the new column has to go before the filler and the filler length reduced accordingly.
Problem: there is no apparent way to place the new column anywhere but after the Filler. The filler in the metadata is the wrong length and there is no way that I can see to change the length.
There is a yellow exclamation mark on the Flat File destination (where the filler is wrong length)
I get these erros when I run the updated package.
"The external metadata column is out of sync with the data source column. The column 'HEA_ID' needs to be updated in the external metadata column collection".
"The column filler needs to be updated in the external metadata column collection"
I have no idea how to fix these errors. Help needed.Hi AllTheGoodNamesWereTaken,
According to your description, you add a new column HEA_ID and make some changes in filler column in the External Columns, so those two columns are out of sync with the data source column.
Please note that columns are created based on the data source columns. So we couldn’t directly change them in the Flat File Destination Advanced Editor.
To avoid this error message, just as Visakh said, just review mappings once again in the Flat File Destination. If we want to change the columns in the Flat File Destination, we need change the source columns.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Maximum length allowed for column name, index name and table name?
Hi,
I want to know what is the maximum length allowed for coulmn name, table name and index name in MaxDB ?
Regards
RajHi Raja,
simply check the catalog:
sqlcli bwt=> \dc domain.columns
Table "DOMAIN.COLUMNS"
| Column Name | Type | Length | Nullable | KEYPOS |
| ---------------- | ------------ | ------ | -------- | ------ |
| SCHEMANAME | CHAR UNICODE | 32 | YES | |
| OWNER | CHAR UNICODE | 32 | YES | |
| TABLENAME | CHAR UNICODE | 32 | YES | |
| COLUMNNAME | CHAR UNICODE | 32 | YES | |
and
sqlcli bwt=> \dc domain.indexes
Table "DOMAIN.INDEXES"
| Column Name | Type | Length | Nullable | KEYPOS |
| ------------------ | ------------ | ------ | -------- | ------ |
| SCHEMANAME | CHAR UNICODE | 32 | YES | |
| OWNER | CHAR UNICODE | 32 | YES | |
| TABLENAME | CHAR UNICODE | 32 | YES | |
| INDEXNAME | CHAR UNICODE | 32 | YES | |
regards,
Lars -
SQL loader Field in data file exceeds maximum length for CLOB column
Hi all
I'm loading data from text file separated by TAB and i got the error below for some lines.
Event the column is CLOB data type is there a limitation of the size of a CLOB data type.
The error is:
Record 74: Rejected - Error on table _TEMP, column DEST.
Field in data file exceeds maximum length
I'm using SQL Loader and the database is oracle 11g r2 on linux Red hat 5
Here are the line causing the error fronm my data file and my table description for test:
create table TEMP
CODE VARCHAR2(100),
DESC VARCHAR2(500),
RATE FLOAT,
INCREASE VARCHAR2(20),
COUNTRY VARCHAR2(500),
DEST CLOB,
WEEK VARCHAR2(10),
IS_SAT VARCHAR2(50),
IS_SUN VARCHAR2(50)
CONTROL FILE:
LOAD DATA
INTO TABLE TEMP
APPEND
FIELDS TERMINATED BY X'9' TRAILING NULLCOLS
CODE,
DESC,
RATE,
INCREASE,
COUNTRY),
DEST,
WEEK,
IS_SAT,
IS_SUN
Data file:
BHS Mobile Bahamas - Mobile 0.1430 1 "242357, 242359, 242375, 242376, 242395, 242421, 242422, 242423, 242424, 242425, 242426, 242427, 242428, 242429, 242431, 242432, 242433, 242434, 242435, 242436, 242437, 242438, 242439, 242441, 242442, 242443, 242445, 242446, 242447, 242448, 242449, 242451, 242452, 242453, 242454, 242455, 242456, 242457, 242458, 242462, 242463, 242464, 242465, 242466, 242467, 242468, 24247, 242524, 242525, 242533, 242535, 242544, 242551, 242552, 242553, 242554, 242556, 242557, 242558, 242559, 242565, 242577, 242636, 242646, 242727"
BOL Mobile ENTEL Bolivia - Mobile Entel 0.0865 Increase 591 "67, 68, 71, 72, 73, 740, 7410, 7411, 7412, 7413, 7414, 7415, 7420, 7421, 7422, 7423, 7424, 7425, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7440, 7441, 7442, 7443, 7444, 7445, 7450, 7451, 7452, 7453, 7454, 7455, 746, 7470, 7471, 7472, 7475, 7476, 7477, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7490, 7491, 7492, 7493, 7494, 7495, 7496" Thank you.Hi
Thank you for youe help, I found the solution and here what i do in my Control file i added
char(40000) OPTIONALLY ENCLOSED BY '"' .
LOAD DATA
INTO TABLE TEMP
APPEND
FIELDS TERMINATED BY X'9' TRAILING NULLCOLS
CODE,
DESC,
RATE,
INCREASE,
COUNTRY,
DEST
char(40000) OPTIONALLY ENCLOSED BY '"',
WEEK,
IS_SAT,
IS_SUN
Thank you for your help. -
Maximum Allowed Text Length for JTable Column
Can you please help me with a JTable Doubt
How do I set the Maximum Allowed Text Length for a Particular Column of a JTable?Thanks a lot mate. I used the following
class MaximumLengthFilter extends DocumentFilter {
public void replace(DocumentFilter.FilterBypass fb, int offset, int length,
String text, AttributeSet attr) throws BadLocationException {
if ((fb.getDocument().getLength() + length) < 10)
fb.replace(offset, length, text, attr);
else
Toolkit.getDefaultToolkit().beep();
} -
How I can Fixed Length of Formula Column
Dear All
I have create a formula column in ORACLE REPORT 6i
it consist on 15 length but problem is that formula column return output in this form
123354,000,00
But I want my formula Column return output just like this
123354,000,00
Column values fixed in line Length
Regard
Muhammad NasirHi
I think you are trying to get a proper format of your output on your report.
I will try to help you based on this assumption.
1) Select the field from paper layout
2) Select Format -> Justify -> Right from the menue. -
Sql to find the length of the column in bytes
Hi
could some one help me in writing the sql to find the actual size of the column in bytes.
thanks in advance790072 wrote:
could some one help me in writing the sql to find the actual size of the column in bytes.If you mean you want to find out column value internal representation in bytes, use VSIZE.
SY. -
Increasing length of number column in oracle 8.1.6
Hi, i have a need to increase one columns in a table that we have that is fairly large and has about millions rows. I have 1 of the columns in the table that have been created originally as number(3). Well i now need to store a 6 digit number in these columns and I am looking to find out if there are any gotchas for me to look out for if I alter the table and increase the sixe of the two columns to a number(10). Will this have any adverse affect on the data currently stored in the table and is it ok to increase the columns without moving data around. As these are daily transaction table and also my data base or older version oracle 8.1.0.6
Even there are number of triggers on these tables
Thanks in advance.Hi,
ALTER TABLE table_name MODIFY column_name column_type;ALTER TABLE supplier MODIFY supplier_name varchar2(100) not null;
If you are increasing then it wont make problem unless if you change from decimal to integer,
We had two purposes for our tests:
Find out whether there are any differences, in terms of conversion time, when the table has a single column or multiple columns.
Find out whether having other columns, such as an integer column, has any effect on the result.
Altering that column sequence results in a drop and re-create of the primary key constraint !
Edited by: CKPT on Jul 22, 2010 4:04 PM -
Need help in modifying the column length
Hi Experts,
I need to modify the length of a column from char(10) to char(5), but it's showing the error of:
ALTER TABLE appr_group_table MODIFY (APPR_TBLNO CHAR(5)) It's showing the below error:
ERROR at line 1:
ORA-01441: cannot decrease column length because some value is too bigI've checked in the dbase but there is no any value of this column having more than 5 characters:
SQL> SELECT APPR_TBLNO FROM appr_group_table;
APPR_TBLNO
ANTAB
ANTAB
ANTST
SCCTR
SOTAB
SOTAB
SOTAB
SOTAB
SOTAB
SOTAB
SOTAB
11 rows selected.Thnx in advance for helping me out.....char means fixed length variable. when you say char(10) oracle will reserve 10 places for your data. that means in your output what you are seeing as blank spaces are also considered as data. that is the reason, it is not allowing you to reduce the size.
better solution is to create new column with varchar2 or char(5) datatype and transfer this column data into new column and then drop original column. -
To increase the length of a vanilla column
Hello Everyone,
I have a situation, where I have to increase a length of a vanilla column in siebel.
I have to increase the length of a base column CORP_STOCK_SYMBOL of a vanilla table S_ORG_EXT. From the tools level I can't do this as it does not allow me to.
If I can make the change from the backend, it won't reflect the same in the tools(Logical Level). But in the DB level you can see that the length has altered. But when u try to update a value and then open the application it throws an SQL error. What I am thinking is, though the length is altered at the physical level, in logical level it has not changed therefore i guess the SQL error is popping.
Or can I alter the S_COLUMN table itself? If it is done, I fear the problem while migrating this to different environment.
Please let me know the solution for this if any of you people have encountered the similar situation.If you insist on increasing the length of the column, I would get Oracle involved.
Another option might be to use a different column or create a new column.
Maybe you are looking for
-
While executing DTP in DSO getting Error?
Hi, I am extracting the data from a flat file..I am loading the data to DSO. While executing DTP i am getting this error "Dump: ABAP/4 processor: SAPSQL_AMBIGUOUS_FIELDNAME" My fields are SID,SNAME,SADD,SMOB. I did twice but again i am getting same e
-
Download error tap to retry and I keepm getting the same error message.
-
Adobe Reader 9.3.2 - PDF attachment won't print from right click
Hi all, Hopefully someone can assist some kind of suggestion, we have just rolled out Adobe Reader 9.3.2 upgrade from v8. When we now try to print a PDF Outlook 2003 attachment from the right click menu, we are prompted with the 'Open With' window.
-
Hi, I am using apex 4.1. I have a report item where a file path(Eg. *\\172.18.19.182\Case Studies Reoriented\MDM\Telenor_MDM_CaseStudy.pdf*) is stored. I build a report where this item is shown as a link in if I click on it, the file should be do
-
Hi. I am a professional photographer so can talk about f/stops and shutter speeds and ISO all day long but Video Codec and fps are all something very new. Please excuse my novice status but I would like help in preparing my first big video project sh