1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Среда, Февраль 08 2023, 12:41 PM
  4.  Подписаться через 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?
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Interested too with the answers to this question...
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
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.
Комментарий
There are no comments made yet.
Jonathan Ashwell Ответ принят
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
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
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.
Комментарий
There are no comments made yet.
Jonathan Ashwell Ответ принят
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?
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
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.
Комментарий
There are no comments made yet.
Jonathan Ashwell Ответ принят
Thanks for the suggestion, Ivan. I've found the problem (it's not Valentina!).

As always, thanks for your help.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Hello, Can you share what was the problem ?
Комментарий
There are no comments made yet.
Jonathan Ashwell Ответ принят
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.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Ah. Ok. Thank you.
Комментарий
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.

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