# Can I clear the symbol in the process

**URL:** https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [May 26, 2015, 10:50am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886 "2015-05-26T10:50:00Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![carfield11](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@carfield11](https://forum.kx.com/u/carfield11)
#### Post date: [May 26, 2015, 10:50am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/1 "2015-05-26T10:50:00Z")

</div>

Hi, I have a data loading job load data from external sources to HDB. After the data loaded, the memory usage growth a lot, and the memory doesn’t return to the system even after I delete all the temp table created.&nbsp;

I suspect during the data loading process, a lot of symbol created and it doesn’t release after the job finish, just wonder, can I clear the symbol in the Q process?

---

<div class="post-metadata">

### Author: ![sohagan](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@sohagan](https://forum.kx.com/u/sohagan)
#### Post date: [May 26, 2015, 10:57am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/2 "2015-05-26T10:57:00Z")

</div>

no..consider redesigning your schema if this is the case.&nbsp;

further clarification here..

[https://groups.google.com/forum/#!searchin/personal-kdbplus/symw$20clean/personal-kdbplus/wclPCspiEYs/h6jeA0zZraQJ](https://groups.google.com/forum/#!searchin/personal-kdbplus/symw$20clean/personal-kdbplus/wclPCspiEYs/h6jeA0zZraQJ)

Thanks,

Sean

---

<div class="post-metadata">

### Author: ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)
#### Post date: [May 26, 2015, 11:00am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/3 "2015-05-26T11:00:00Z")

</div>

does the result from

.Q.w`syms`symw

confirm your suspicions?

---

<div class="post-metadata">

### Author: ![carfield1](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carfield1](https://forum.kx.com/u/carfield1)
#### Post date: [May 26, 2015, 4:29pm UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/4 "2015-05-26T16:29:00Z")

</div>

Thanks Charles, yes, it is, the `symw take up most of the space

---

<div class="post-metadata">

### Author: ![carfield11](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@carfield11](https://forum.kx.com/u/carfield11)
#### Post date: [June 15, 2015, 10:52am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/5 "2015-06-15T10:52:00Z")

</div>

Hi all, like to bring up an old thread.&nbsp;

We spent sometime and identified few column that better to saving in Character array ( string ) rather than symbol. However, long like we need to export all old records to CSV and then import again, is it? Is there better way to solve this issue?

We’ve check for this script&nbsp;[http://code.kx.com/wiki/Contrib/CompactingHdbSym](http://code.kx.com/wiki/Contrib/CompactingHdbSym) , but it run very slow and doesn’t that useful. Will anyone have better suggestion for me?

---

<div class="post-metadata">

### Author: ![LamHinYan](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@LamHinYan](https://forum.kx.com/u/LamHinYan)
#### Post date: [June 15, 2015, 1:18pm UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/6 "2015-06-15T13:18:00Z")

</div>

To perform data conversion you don’t have to go thru CSV as an intermediate format. You can perform in-memory conversion and write the results to disk. You can also send the old data to a new server over the network.

---

<div class="post-metadata">

### Author: ![carfield11](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@carfield11](https://forum.kx.com/u/carfield11)
#### Post date: [June 16, 2015, 2:52am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/7 "2015-06-16T02:52:00Z")

</div>

Right, sure, but what I mean is if there any tool that can do something like&nbsp;

castcol:{[dbdir;table;col;newtype]&nbsp;

And it will also clean up the sym file, rather than dump the data and load it again in whatever way.&nbsp;

---

<div class="post-metadata">

### Author: ![david\_demner](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@david\_demner](https://forum.kx.com/u/david_demner)
#### Post date: [June 16, 2015, 3:19am UTC](https://forum.kx.com/t/can-i-clear-the-symbol-in-the-process/9886/8 "2015-06-16T03:19:00Z")

</div>

\<canlwsqxmjf\_hhreegpshxzzduqf\_kdyjzkm\>  
\<cacfbovcqoet0cum4capgid8v58y-xw2\_l4cj\_h2rkqo3qno9tw\>  
  
  
\<84f92eb9-2c2b-4072-9eb9-91be764ae669@googlegroups.com\>  
To: Carfield Yim , [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)

Hi Carfield,

  

A few months ago, I put a script at the bottom of the page you posted.=E2=80=8E It's multithreaded (so run with -s) and quite performant.

  

But fundamentally you have to start the sym file from scratch, which is non-trivial.

  

Feel free to try out the script and contribute any suggestions by editing the page.

  

David
 
  

 

 

 |  
 
**From:** Carfield Yim

**Sent:** Monday, June 15, 2015 18:52

**To:** personal-kdbplus@googlegroups.com

**Reply To:** personal-kdbplus@googlegroups.com

**Subject:** Re: [personal kdb+] Can I clear the symbol in the process

 |

  

Right, sure, but what I mean is if there any tool that can do something like 
  

castcol:{[dbdir;table;col;newtype] 

  

And it will also clean up the sym file, rather than dump the data and load it again in whatever way.   
  
On Monday, June 15, 2015 at 8:18:11 PM UTC+8, Yan Yan wrote:

> To perform data conversion you don't have to go thru CSV as an intermediate format. You can perform in-memory conversion and write the results to disk. You can also send the old data to a new server over the network.
