1. Beatrix Willius
  2. Valentina Database ADK
  3. Среда, Май 26 2021, 05:02 AM
  4.  Подписаться через email
Having a senior moment: how do I increase the segment size of an archive? Got a user with a very old archive whose segment size is 32k. I thought I remembered that cloning should increase the segment size. But the value is unchanged after cloning.

By the way, doing a clone in Valentina Studio makes an error message.

Any idea how to increase the segment size? Dumping and loading a dump makes those huge file sizes and it never really works.

Regards

Beatrix Willius
Вложения
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
You may do it via SQL:


CLONE DATABASE TO 'new_db.vdb' WITH
SET PROPERTY "SegmentSize" of DATABASE TO 65536;
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Hi Beatrix,

Don't know if it exist a method to modify segment size directly.
I clone the db myself in code.
Like this :

dim db As VDatabase
dim f As Folderitem
// Set f
db.Create( f, EVDbMode.kDsc_Dat_Blb_Ind, 32 * 1024 ) ' segment size = 32 k
// Create tables
// Copy records from old Database to new db

Best regards

Just curious : why do you want to increase the segment size ?

François
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
@Ivan: nope, doesn't work. Gives me the same error as when trying to clone with the context menu. I made sure that the database is open. See screenshots. Latest Valentina Studio 11.2.5.

@François Van Lerberghe: my databases can become very large. A 32k segment size has a maximum database size of over 60 GB. Nowadays, I'm using 262k segment size. The feature of importing databases has been on my to-do list since forever. But right now it doesn't exist.
Вложения
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
It works on my side with some test db. What about diagnose the source db? BTW, I see some cloned db created - is it empty?
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
BTW, I did it locally - not against vServer. Can you try clone without connect to vServer?
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
I'm working locally without vServer. Cloning in Valentina Studio also doesn't work for me with the same error. I tried again and got the same error. What am I doing differently? Please see the screenshots from my first post.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
There is opened connection to 127.0.0.1
Yes, you do it locally, but somehow that opened connection confuses vStudio.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
That definitively is a bug. I'll do a bug report later.

Okay. No error message but no success either. The command now does nothing. Valentina Studio says "executing query" and there are no records copied over.

How do I make the clone? I've created the clone with a context click in Valentina Studio. Then I told Valentina Studio not to copy the records.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Strange - it works for me.
Run vStudio.app, open source db locally, do that sql, open cloned db. All the records are there, structure is also the same.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
This is working for me too. But you have to give the whole shell path for the new db.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Using the shell path for the new database doesn't work at all:

CLONE DATABASE TO '/Users/beatrixwillius\ 1/Desktop/max_clone.vdb' WITH
SET PROPERTY "SegmentSize" of DATABASE TO 262144;

I really wish that there were nice error messages.
Вложения
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
This is working for me :

CLONE DATABASE TO '/Users/francoisvanlerberghe/Projets coke/Databases/new_db.vdb' WITH
SET PROPERTY "SegmentSize" of DATABASE TO 65536;

Note the non-escape space for the folder name "Projets coke"
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Thanks! The native path worked fine.
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.