SQLite Tools for windows 64bit
(1) By carlbauh on 2022-09-06 15:51:06 [link] [source]
Can I ask why SQLite official release does not have 64bit for Windows? I guess with increasing the maximum database size[1], it is a shame that there is no option to handle big memory databases. Is there a technical reason or just no need for it?
[1]https://www.sqlite.org/limits.html
(2.3) By Chris Locke (chrisjlocke1) on 2022-09-06 16:16:50 edited from 2.2 in reply to 1 [source]
There is a 64-bit DLL for Windows.
sqlite-dll-win64-x64-3390300.zip
Listed on this page- sqlite.org/download.html
(3) By Larry Brasfield (larrybr) on 2022-09-06 16:46:01 in reply to 1 [link] [source]
You appear to be operating under a misapprehension regarding the relation between database size and pointer size. The DB engine imposes the same limits whether it is built with 32-bit pointers or 64-bit pointers. Hence, there is no need for "an option to handle big memory databases."
(4) By RandomCoder on 2022-09-06 17:08:17 in reply to 3 [link] [source]
There is a limit of ~2GiB, on the provided build of the shell:
SQLite version 3.39.3 2022-09-05 11:02:23
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE example(value INT);
sqlite> INSERT INTO example SELECT VALUE FROM generate_series(0, 300000000);
Runtime error: out of memory (7)
sqlite> .stats
Memory Used: 2169632 (max 2014973744) bytes
The insert fails due to SQLite being unable to access more than 2GiB of memory.
However, on the same machine with a 64-bit build of the shell:
SQLite version 3.39.3 2022-09-05 11:02:23
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE example(value INT);
sqlite> INSERT INTO example SELECT VALUE FROM generate_series(0, 300000000);
sqlite> .stats
Memory Used: 4207743544 (max 4207753328) bytes
As for providing such an executable: I'd imagine the need for such large in-memory databases is fairly esoteric. I have such a need, but I'm fine with just building the shell myself, since I also want to include some non-standard extensions as well.
(5) By carlbauh on 2022-09-07 07:29:01 in reply to 4 [link] [source]
Thanks for better showing the point. I guessed with such a world-popular library and with most machines using SQLite Tools using 64bit these days, a proper build and release for them is a proper choice. Yes, you can always build SQLite, but having a well-known URL that you can point to your colleagues (who don't have a C compiler, or not a programmer, and a DB user) and clients is a comfort. And at this point, I guessed asking why not there is not a build for X64.
(6) By Simon Slavin (slavin) on 2022-09-07 14:00:44 in reply to 5 [link] [source]
There are about 2.4 billion to 3 billion home computers in the world. Around one third of all adults own one.
There are about 6.4 billion to 6.8 billion smartphones (any phone with fullscreen graphics and touchscreen) in the world. Around 3/4 of all adults own one.1
You can assume SQLite is installed on all the above. If the SQLite developers went by popularity of platform it would put most of its attention on smartphones and care less about home computers.
SQLite is a programmer's tool, not a user's tool. Anyone who is not a programmer (your colleagues in your text above) shouldn't be caring about it. They certainly shouldn't be looking around for libraries to install. If you want SQLite in your project, include the amalgamation C code in your project. Then you can forget about DLL files entirely, and you never have to worry about your users having no, or an incompatible, DLL.
- ^ Ownership figures are averages across various online sources, and take into account one person owning many devices.
(7) By Stephan Beal (stephan) on 2022-09-07 14:17:43 in reply to 6 [link] [source]
If you want SQLite in your project, include the amalgamation C code in your project. Then you can forget about DLL files entirely, and you never have to worry about your users having no, or an incompatible, DLL.
That's the ideal scenario, but there's a catch...
Some Linux distributions truly dislike packages including the amalgamation (namely Debian), at least in part because it keeps them from rolling out "critical updates system-wide" when 27 apps each embed their own copy of sqlite3.c. (Space usage is also an argument, but not one which holds much weight nowadays.) Even within the Fossil SCM project (sqlite3's closest sibling) we've gotten grief from package maintainers1 about the project including its own copy of the amalgamation, and support use of a system-level copy of sqlite3 with the primary purpose of keeping distribution package maintainers2 happy.
That is to say: though including the amalgamation is The Right Way to do it, it may, depending on the project's audience, lead to some level of grief.
(8) By carlbauh on 2022-09-07 16:03:59 in reply to 6 [link] [source]
Thank you for the answer, but it seems you completely missed the point. First, I said "most machines using SQLite Tools using 64bit these days" the key part is "SQLite Tools". Second, many DB developers or power users are not professional programmers who can easily compile SQLite. Third, SQLite Tools is a tool for ease of use, and again "most machines using SQLite Tools using 64bit these days", so it can be a proper expectation to have a proper build for the platform.
I hope one of the team members like @drh can comment on this.
(9) By Deon Brewis (deonb) on 2022-09-08 05:43:23 in reply to 8 [link] [source]
DB Developers / Power Users don't typically use a command line tool. They use something like SQLite Expert, SQLiteStudio or Navicat. All of which are 64-bit.
(10) By carlbauh on 2022-09-08 07:05:58 in reply to 9 [link] [source]
Yes but they are limited compare to SQLite Tools and for example you can not send a script to a client so they can run on a database. eg using the readfile function.
(11) By Chris Locke (chrisjlocke1) on 2022-09-08 07:32:06 in reply to 5 [link] [source]
You realise SQLite Tools isn't developed by the same people that develop SQLite, right?
(12) By nalgeon on 2022-09-08 08:55:48 in reply to 8 [link] [source]
You can grab 64-bit Windows SQLite shell (sqlite3.exe) here: https://github.com/nalgeon/sqlite
It doesn't include sqldiff and sqlite3_analyzer though.
(13) By ET (EricTsau) on 2022-09-08 09:22:04 in reply to 1 [link] [source]
This argument has come up again and again, over the years, and will not be realized ever.
So therefore the closest "official" sqlite 64 bit tool you'll find for Windows would be the one embedded in the fossil scm.
> fossil sqlite --no-repository
(14) By carlbauh on 2022-09-10 07:58:28 in reply to 11 [link] [source]
As far as I am looking at the repo, it seem @drh is working on them.
(15) By carlbauh on 2022-09-10 08:00:44 in reply to 13 [link] [source]
It can not be realized, if it cant be find, I searched before posting and couldn't find an asnwer. Thank you, fossil way is a good hack!
(16) By Sunny Saini (SunnySaini_com) on 2022-09-12 12:49:27 in reply to 6 [link] [source]
SQLite is a programmer's tool, not a user's tool.
I deny.
I am not a programmer but am using SQLite daily for creating and managing my databases since last 4 years, especially on Android phone.
(17) By Sunny Saini (SunnySaini_com) on 2022-09-12 12:52:12 in reply to 9 [link] [source]
You are right.
On Android I use aSQLiteManager App and in Windows sqlitegui.exe by Little Brother (Git hub).