Getting Started with MapD, Part 2: Electricity Dataset
randyzwitch.com
randyzwitch.com
I was running queries where I was looking for ever point within a given distance of a source point (queries often had 10s to a hundred-something source point s), within a given time period.
MapD would scream through the hose queries ludicrously fast, I don't think I ever had a query run for longer than half a second, 0.7 seconds tops.
While I wasn't running the most complex queries, I also didn't have to do any complex setup (I literally just loaded the data in via command line, single table, nothing special), it was awesome.
That being said a 146MB CSV with 5 million rows is not a challenge for vanilla PostgreSQL either. If you're willing to add an index and use window functions (which MapD doesn't seem to support), you can run this query in ~34ms: https://gist.github.com/felixge/fffef4bc41a5e87e26f62c2a5c8e...
I have no experience with MapD, but people often significantly underestimate the performance of relational databases and reach for the big/expensive toys too soon.
As far as the "big/expensive toys", I'm using the Community Edition, which is FOSS.
As far as "big/expensive toys" go, I was referring to total cost of ownership of putting something like MapD in production vs PostgreSQL. The latter can run on any machine (no GPU needed), there are plenty of hosted services, and there is a large pool of people familiar with it. If this is just about running some analysis on a local machine, that argument doesn't apply so much :).
I’d also say that while this is a great example of getting up and running with MapD the system really shines when doing interactive queries over datasets from the 100M to 100B record range without requiring indexes.
edit: Actually, I get this (uncached) in the sqlite3 CLI (the 60-70ms where via sqlitebrowser):
Run Time: real 0.018 user 0.018164 sys 0.000135
Here is the database if you want to play around with it. https://transfer.sh/VkWXe/sqlite.db.gzThe GPU really only helps when you need a higher throughput - eg. you're analyzing many billions of rows, or are running a relatively compute-intensive query.
the overhead of indexes at tiny data sizes like this is minimal, so no surprise that sqlite or pg will compare favorably at laptop scale (FWIW, i ran this on a 4-core macbook pro with no GPU (i.e CPU only) and without indexes, mapd runs the query at ~1.5 sec while sqlite takes ~6).
however, the bigger point is about how this experience scales. take a look at this public demo - https://www.mapd.com/demos/ships. it's 11 billion geo data points, and you'll see the same low millisecond response that FridgeSeal is talking about - again, no indexing (to verify, go to dev tools in your browser, turn on SQLLogging(true) in the console and look at the query times reported for the round trip. i'm sure you appreciate that the overhead (both creation and maintenance) of indexing scales with data size, plus sqlite/pg dont (AFAIK) offer anything by way of GPU-rendered charting.
My point was that the submitted post did not make a convincing argument pro MapD when query times are that much slower than a trivial SQLite database.
2010-01-15 00:00:00,DPL,24,2017.425
...
,1/3/2017,1,RTO
...
7/5/2017,VMEU,22,97.495 ACTUAL_DATE,ZONE_NAME,HOUR_ENDING,MW
1993-01-01 00:00:00,AE,1,855.0
1993-01-01 00:00:00,BGE,1,2358.0
1993-01-01 00:00:00,DPL,1,1150.0
1993-01-01 00:00:00,GPU,1,3772.0
1993-01-01 00:00:00,JCPL,1,1632.0
1993-01-01 00:00:00,METED,1,929.0
1993-01-01 00:00:00,PECO,1,3015.0
1993-01-01 00:00:00,PENLC,1,1211.0
1993-01-01 00:00:00,PEPCO,1,2137.0It looks like dates are stored not as dates but strings in the more recent spreadsheets.
edit: dateutil's parser.parse(x) & strftime("%Y-%m-%d") helps