on 2019 Jan 14 8:56 AM
Hello, all In my DB there are multiple log tables, which store app info connection property. After certain time passes, this value is no longer used and the field can be annulled in some records. Does DB space usage decrease when long nvarchar is set to null?
Thank you Arcady
Request clarification before answering.
Not immediately, because SQL Anywhere never shrinks the database files by itself, as documented here. You will need to do a reload to shrink the database files.
However, deleting rows or setting fields to NULL will mark their previous place as "free" so further data can be placed there, that way reducing the need for further file growth.
Please also have a look at that question, which also lists some diagnostic tools.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can't say that because I'm not sure whether sa_table_page_usage() will show when pages are only "partially freed" because there is still data on them. You may also look at the sa_table_fragmentation system procedure.
Here's another FAQ why it may take some time until the process of free'ing deleted data is really observable.
User | Count |
---|---|
62 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.