Type is one thing. Efficient querying (which implies some appropriate index structure) is another.
Weak example to ask precisely when the plane is at X feet, not an inch higher/lower - this is more typically a range query, and the Postgres range datatype is quite good at this, notably GiST indexes for overlap queries:
https://www.postgresql.org/docs/9.3/functions-range.html#RAN...
https://www.postgresql.org/docs/current/rangetypes.html#RANG...
PostgreSQL allows for all of that: User-defined types with user-defined index structures and whatnot. PostgreSQL is great and flexible, yet transaction safe and fast. You should really try it. It is one of the highest-quality FLOSS projects I have ever seen, not just in term of code quality, but also in terms of project and community management.
Re:BTrDB: Berkeley Tree Database
by scottlocklin on Wednesday June 26, 2019 @12:00PM
(#20286224)
It is hilarious seeing this problem over and over and over again when it was solved in the APL language family ... some time in the 1960s.
Re:BTrDB: Berkeley Tree Database
by i_don_t_know on Wednesday June 26, 2019 @01:45PM
(#20287303)
Could you explain how this is solved in APL?
Re:BTrDB: Berkeley Tree Database
by scottlocklin on Thursday June 27, 2019 @09:09AM
(#20294026)
I did a startup solving this problem (yet again) in an APL; we sucked at enterprise sales, but our data structures went rather faster than BTrDB. The most famous example of solving this problem being Kx systems. Less famous, but basically using the same ideas (these guys all worked with Art and the Iversons):
http://marketgridsystems.com/
And no, I won't explain it in detail. I consider the spark team basically cretins, and it would ruin several of my pals businesses while transferring wealth to hedge funds, exchanges and advertising groups making solutions to this problem available for free. I'll continue to snigger up my sleeve at the fact that decades of open source development still haven't noticed things which were obvious in the 1960s.
Edit add: a great example of this kind of thing, if not this exact thing: some poor guy trying to solve a 25tb problem using spark, parquet files ... finally solving it with ... Awk. Old tools written when 1mb was a lot of memory; sed, awk, tr, cut: vastly better than new tools.
Re:BTrDB: Berkeley Tree Database
by i_don_t_know on Friday June 28, 2019 @01:10AM
(#20301658)
I guess this is another instance of Alan Kay's "computer science is pop culture". We don't remember our history because reinventing it is so much fun.
I thought that was part of the problem that postgres range types solves? https://www.postgresql.org/docs/current/rangetypes.html