简体   繁体   中英

SQLite extremely slow: Windows vs. OpenBSD

I read a lot, I know Stackoverflow is full of SQLite speed problems, I tried a lot of thing, but nothing worked. And also mine is a little bit different.

So here is my problem: I have an average PC (with i3 cpu) for developing, really nothing special. (windows os)

I have to work with SQLite database files, and on my PC I have really no problems. Queries are fast, I mean which one must runs in 1s it does, which one need 5 secs, it runs in 5 secs.

But!

The same java code, with the same SQLite queries on our company server (this server has an OpenBSD OS) run EXTREMELY slow. I mean a 1s query runs in 30 s, and a 5s query runs in 30 min(!!).

Unacceptable.

I really tried everything: using transactions, not using transactions, add indexes, drop indexes, using different joins, changing my queries, I tried different JDK-s, only running on the server, and building too on the server, but nothing helped: in every case on that server the queries are slow.

I have no more ideas why. Can someone give me a tip about this?

Of course I have 'suspects', but not facts. One is the OpenBSD itself. And also it seems to very slow opening (or connecting to) these database files, but mostly these are just feelings.

If you're using Xerial's sqlite-jdbc library, the official releases include SQLite shared libraries for Linux (x86, x86_64, arm, armhf), FreeBSD (amd64), OS X (x86, x86_64) and Windows (x86, x86_64). On other platforms such as OpenBSD, a pure JVM bytecode NestedVM version of SQLite is used which is substantially slower.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM