I know that in Microsoft Access there is a mechanism called Repair Database, which as result optimizes the performance and the size of the database.

Is there any similar mechanism in SQL Anywhere?

We have currently problems of database size (some gigabytes), and we know that the actual data is not that big, but the most of size is 'debris' remaining from INSERT and DELETE

asked 09 May, 14:07

Sako's gravatar image

Sako
1.0k405595
accept rate: 25%

edited 09 May, 14:27

Volker%20Barth's gravatar image

Volker Barth
36.1k342501749


In many cases, space that has been used in the database and freed will get reused. If that is not the case in your environment (the growth is an one-time event), rebuilding the database makes sense. Otherwise, the cost of rebuilding a database that will grow again may not provide much benefit.

There are two approaches to rebuilding a database that is involved in replication or synchronization.

permanent link

answered 10 May, 10:01

Chris%20Keating's gravatar image

Chris Keating
5.0k2784
accept rate: 33%

You can use dbinfo or various system procedures to check for free pages, and you can use reorganize table for a running database or a complete reload to minimize size. There are many FAQ here related to this topic.

Aside: Having used MS Access as a database in former times, I would really refrain from comparing it and its "repair mode" to a "real" database system like SQL Anywhere...

permanent link

answered 09 May, 14:25

Volker%20Barth's gravatar image

Volker Barth
36.1k342501749
accept rate: 34%

converted 10 May, 03:33

Thanks for the comment.

What you mean exactly with Reload? Do you mean Unload + Load into a new empty database?

(09 May, 14:56) Sako
Replies hidden
Comment Text Removed
1

Yes. That's the only way to reduce the database size.

(09 May, 15:49) Volker Barth

This process we do sometimes.

But this process does not always result a new product DB which can functionally replace the original one!

An example is a DB with SQL Remote, or even with Mobilink!

(09 May, 17:43) Sako
3

You certainly CAN reload databases for SR or ML - you just have to do this as required, see the docs - it's easiest via dbunload -ar directory...

(09 May, 17:47) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×259
×17
×13
×9

question asked: 09 May, 14:07

question was seen: 122 times

last updated: 11 May, 02:45