[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SQLite surprisingly slow
From: |
Tassilo Horn |
Subject: |
Re: SQLite surprisingly slow |
Date: |
Wed, 02 Oct 2024 08:38:47 +0200 |
User-agent: |
mu4e 1.12.6; emacs 31.0.50 |
Eduardo Ochs <eduardoochs@gmail.com> writes:
Hi Eduardo,
> Below is a self-contained miniature. Its sexps are intended to be
> executed with the reader's favorite variant of C-e C-x C-e, and
> executing the "diskcmds" _usually_ takes more than one second here.
For me, everything is instant (thinkpad t440p from 2015):
(mapcar 'my-benchmark-elapse diskcmds)
;=> (9.2139e-05 0.000137043 0.000237876 7.6672e-05 6.8938e-05 2.6967e-05
1.9757e-05)
Ah, well, but that might be because my /tmp is tmpfs. So I've tried
with a normal ext4 path for the database file.
;=> (8.3249e-05 0.003061723 0.016174854 0.012242847 0.014563132 5.3762e-05
3.2495e-05)
Well, it's still on a SSD, so it might be slower with spinning disks.
But a second for a CREATE TABLE, two INSERTS, and a SELECT seems too
long. And one minute for 300 inserts sounds wrong, too. But I have no
clue where to find the culprit. Does it take that long when issuing the
SQL commands from the prompt you get with "sqlite3 /tmp/foo.db"?
I'm using sqlite 3.46.1 here.
Bye,
Tassilo
- Re: SQLite surprisingly slow,
Tassilo Horn <=