From: Tassilo Horn <tsdh@gnu.org>
To: Eduardo Ochs <eduardoochs@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: SQLite surprisingly slow
Date: Wed, 02 Oct 2024 08:38:47 +0200 [thread overview]
Message-ID: <87bk032emg.fsf@gnu.org> (raw)
In-Reply-To: <CADs++6jgHbEwqK75gsqQDxHJ3Xr526OMZd-V=An_KwowWQ=TtA@mail.gmail.com> (Eduardo Ochs's message of "Sun, 29 Sep 2024 23:25:46 -0300")
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
next prev parent reply other threads:[~2024-10-02 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 2:25 SQLite surprisingly slow Eduardo Ochs
2024-10-02 6:38 ` Tassilo Horn [this message]
2024-10-04 17:44 ` Eduardo Ochs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bk032emg.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=eduardoochs@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).