# Issue while inserting data with a string value greater than 32kb

**URL:** <https://community.cratedb.com/t/issue-while-inserting-data-with-a-string-value-greater-than-32kb/1900>\
**Category:** CrateDB\
**Tags:** data-storage\
**Created:** [November 13, 2024, 2:13pm UTC](https://community.cratedb.com/t/issue-while-inserting-data-with-a-string-value-greater-than-32kb/1900 "2024-11-13T14:13:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snehal\_Jadhav](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/snehal_jadhav/32/1317_2.png) [@Snehal\_Jadhav](https://community.cratedb.com/u/Snehal_Jadhav)\
**Post date:** [November 13, 2024, 2:13pm UTC](https://community.cratedb.com/t/issue-while-inserting-data-with-a-string-value-greater-than-32kb/1900/1 "2024-11-13T14:13:10Z")

</div>

We have created a table with defination 'create table TestLargeData (  
id long,  
name string,  
primary key (name,id )  
)  
WITH (  
“translog.durability” = ‘ASYNC’  
);

’  
When size of name string is greater than 32kb,the record doesn’t get inserted. It gives error as “SQLParseException[Document contains at least one immense term in field=”\_id" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. … original message: bytes can be at most 32766 in length; got 34145]".

We tried the define column with INDEX OFF option, but still the issue exists.  
We are not sure about how to use the analyzer option.

Could you please provide any suggestions to get over this issue?

---

<div class="post-metadata">

**Author:** ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)\
**Post date:** [November 13, 2024, 2:15pm UTC](https://community.cratedb.com/t/issue-while-inserting-data-with-a-string-value-greater-than-32kb/1900/2 "2024-11-13T14:15:04Z")

</div>

You need to deactivate columnar storage to store a string with more than 32766 bytes. Also see docs:

> **[Storage](https://cratedb.com/docs/crate/reference/en/latest/general/ddl/storage.html)**
>
> Data storage options can be tuned for each column similar to how indexing is defined. Column store: Beside of storing the row data as-is (and indexing each value by default), each value term is stored into a Column Store by default. The usage of a...

```sql
CREATE TABLE "TestLargeData" (
    "id" long,
    name string INDEX OFF STORAGE WITH (columnstore = false)
   primary key ( id )
);

```

* * *

edit: this might still not work when trying to use the column in the primary key, as that also implies it needs to be indexed.
