1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Mittwoch, Februar 08 2023, 12:41 PM
  4.  Abonnieren via E-Mail
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?
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
Interested too with the answers to this question...
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
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
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
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?
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
Thanks for the suggestion, Ivan. I've found the problem (it's not Valentina!).

As always, thanks for your help.
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
Hello, Can you share what was the problem ?
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
Ah. Ok. Thank you.
Kommentar
There are no comments made yet.
  • Seite :
  • 1


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