1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Wednesday, February 08 2023, 12:41 PM
  4.  Subscribe via email
I've run into a puzzling problem that still exists in 12.7. I have two tables in my database that can have thousands of records. For the first, even with 50K+ it opens quickly. But for the other, with 18K records it takes 1-2 minutes to open when this is executed: myDatabase.Open(myDB)

The table is created like this

dim s as String = "CREATE TABLE IF NOT EXISTS LinkTable(uuid String(36), parentUniqueID integer, childUniqueID integer, linkRelationship integer, comments text(128), dateAdded ullong, dateModified ullong, remoteSynced integer NOT NULL, changeTag varchar(2044), encodedCloudRecord blob(2048))"

Is there something I can do to improve this?
Comment
There are no comments made yet.
Interested too with the answers to this question...
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
Hi Jom,

Ivan asks to send him the ZIP of that db,

The first guess - it reindexes during the opening.
maybe some index was corrupted.
You can try to reindex explicitly then close open to see if helps, or clone db and again see if helps.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Jonathan Ashwell Accepted Answer
Hi Ruslan, I'm glad to hear from you! To you and all the guys, be safe.

The table isn't indexed, but reindexing the database doesn't help, nor does cloning. The only thing that recovers the speed is to open it in VS and remove the contents of the table.

I'll send to Ivan at valentina-db.com
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ivan Smahin Accepted Answer
Jon, thanks again for the db.

I've tried it open in ValentinaStudio (v.13). But I'm sure it would be the same with v.12.7.
No speed issues were detected. Just the first time it is internally converted to the newest internal db format.
It did not take too long either, but you probably see some slowdown of that conversion.
Again - it's about of first time open only.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Jonathan Ashwell Accepted Answer
Yes, I know, it opens very quickly in VS for me, too. But not for my app. .open(f) takes forever (1-2 minutes). This is every time, not just the first time it's opened. Is there a log setting I can turn on? Or can I provide you with my app?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Ivan Smahin Accepted Answer
It's better to see your code. I guess it is about some "class-way" and probably some mismatching of your structures and real db.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
Jonathan Ashwell Accepted Answer
Thanks for the suggestion, Ivan. I've found the problem (it's not Valentina!).

As always, thanks for your help.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
Hello, Can you share what was the problem ?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 8
Jonathan Ashwell Accepted Answer
Another developer had overridden the .open event and had inserted a method that checked the integrity of the table's data. It was Ivan's comment about a problem with the SQL vs class way that made me go back an look at that code in detail.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 9
Ah. Ok. Thank you.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 10
  • Page :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories