News for hackers. Stuff that matters.
Re:The AWS and MongoDB Infrastructure of Parse by nodamage on Thursday February 09, 2017 @04:45AM (#13605745)
> At this very moment, I'm working on a classical DBMS, searching through around 200 million tuples within the order of 2 seconds

Just curious, does this kind of performance require dedicated hardware or is it possible on platforms like AWS?

Re:The AWS and MongoDB Infrastructure of Parse by edejong on Thursday February 09, 2017 @05:10AM (#13605857)
This is on a AWS RDS instance, everything is in (DBMS) cache, db.m4.large.
Re:The AWS and MongoDB Infrastructure of Parse by geocar on Thursday February 09, 2017 @05:31AM (#13605936)
You should revisit your schema. That sounds much too slow.

    q)a:(200000000?200000000),-42 /pick some random numbers
    q)\t a?last a
    303
303msec for a linear scan of 200m ints on an i5 laptop means you should be able to do better than 2sec for a "smart" query.
Re:The AWS and MongoDB Infrastructure of Parse by edejong on Thursday February 09, 2017 @06:28AM (#13606179)
Well, the schema is a bit more complicated than that. I'd say the 100M / s query rate is sufficient. Here we search for trajectories (road segments + time) going through certain regions within a certain repeating time-interval (say, 2 AM on a Sunday), in a 3 month time interval.
Re:The AWS and MongoDB Infrastructure of Parse by philliphaydon on Thursday February 09, 2017 @05:57AM (#13606038)
It seems slow to me too...

We have tables with > billion records In RDS / SQLServer and return results in <1 second...

Re:The AWS and MongoDB Infrastructure of Parse by reissbaker on Thursday February 09, 2017 @07:49AM (#13606522)
Although it sounds like the OP might have some tricky queries, just want to echo that relational databases can be (very) fast if you know how to index them: one of our RDS MySQL tables has 3+ billion rows and queries on it average ~50 milliseconds.
Re:The AWS and MongoDB Infrastructure of Parse by felixge on Thursday February 09, 2017 @07:26AM (#13606418)
And that's for a sequential scan over all of those tuples?

That'd be very impressive. Does SQLServer support parallel execution? Or how come it be so fast?

Re:The AWS and MongoDB Infrastructure of Parse by philliphaydon on Thursday February 09, 2017 @08:30AM (#13606734)
> Does SQLServer support parallel execution?

For a long time as far as I know?

Re:The AWS and MongoDB Infrastructure of Parse by felixge on Friday February 10, 2017 @01:36AM (#13613669)
Cool. I'm not familiar with it, that's why I ask :).

Anyway, is the performance you mentioned for a scan over the entire table? E.g. to do an aggregate?

Re:The AWS and MongoDB Infrastructure of Parse by philliphaydon on Friday February 10, 2017 @02:38AM (#13613856)
Honestly don't remember, I'm working on new stuff in PostgreSQL now.

I know a count of the whole table takes about a minute tho. But the filter > group by was ~1s as the grouping was done on about < 50 rows of the filtered result.

Without knowing the original query above was using it's speculation on why it was slow and mine was fast. My argument is just that SQL Server isn't magically slow. MySQL/PostgreSQL/SQL Server are super fast. And if you don't massage the database it can be super slow too.

Re:The AWS and MongoDB Infrastructure of Parse by felixge on Friday February 10, 2017 @04:03AM (#13614166)
Thanks.

> I know a count of the whole table takes about a minute tho. But the filter > group by was ~1s as the grouping was done on about < 50 rows of the filtered result.

Yeah, that makes sense.

I'm running some queries in production that take a 150 million row table, filter it down to ~100-300k rows which are then aggregated/grouped. This usually takes < 1s. However, if I'd try to do a count(*) on the table, that'd be around a minute as well.

> Without knowing the original query above was using it's speculation on why it was slow and mine was fast. My argument is just that SQL Server isn't magically slow. MySQL/PostgreSQL/SQL Server are super fast. And if you don't massage the database it can be super slow too.

Yeah. The query / query plan will be needed to go more in-depth on these kind of discussions. The amount of disk vs memory hits during execution obviously as well.

Anyway, I just wanted to understand if SQL Server was e.g. an order of magnitude faster than Postgres when scanning a large number of tuples. But I guess the answer to that is: probably not.

Re:The AWS and MongoDB Infrastructure of Parse by philliphaydon on Friday February 10, 2017 @04:24AM (#13614242)
PostgreSQL has a BRIN index's as of 9.6 which may make some forms of aggregation faster than SQL Server I believe. Would need to do real-world tests to verify that tho.
Re:The AWS and MongoDB Infrastructure of Parse by xref on Friday February 10, 2017 @12:21AM (#13613411)
Just to clarify, the whole db fits into 8gb of ram you're saying?