-
Notifications
You must be signed in to change notification settings - Fork 163
sqlite3 one-liner(ish) for benchmarking #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
On my MacBook Pro (2.6Ghz 32MB 2019) it takes 12.4s using |
Yeah I just am not considering that a reasonable one-liner. Open to other wording but the popularity of all these tools kind of demonstrates how that is not what everyone is settling for. |
This works too:
|
That's a good one! And wow it's 4s on my machine. Adding to the list. |
Closed in 8f68cde |
Turned this into a TIL: https://til.simonwillison.net/sqlite/one-line-csv-operations - I just found out you can output in different formats too, e.g.:
Which outputs markdown you can embed in an issue like this:
|
Really slick, @simonw |
Meanwhile I have this # Query a csv file with sqlite
# Usage: cq <csv_file> [<table>]
cq() {
local csv_file="${1:?Usage: cq <csv_file> [<table>]}" table="${2:-T}"
sqlite3 -interactive -cmd '.headers on' -cmd '.prompt "\nsqlite> "' \
-cmd '.mode csv' -cmd ".import '$csv_file' '$table'" -cmd ".mode column"
} |
Follows #69 - the README at https://github.com/multiprocessio/dsq/tree/b7af2679038f8b09802c88f2f088bcc78fa8872c#benchmark says
sqlite3
can't do one-liners, but it sort-of-can - this works for running the taxi query:The text was updated successfully, but these errors were encountered: