Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
olavk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
181.
▲
by
olavk
8y ago
Surely it depends on the custom code in question if it is faster or slower than the similar ORM logic? You may be able to write faster code, but unless you are Donald Knuth, you can't guarantee that any custom code you write will al
182.
▲
by
olavk
8y ago
You cannot through experiments prove that the law of conservation of energy holds in all cases. Indeed you cannot through observation prove that any law of nature holds in all cases. But you only need a single counterexample to show that
183.
▲
by
olavk
8y ago
In NHibernate and Entity Framework you just say .Include("Region").Include("Vendor") to eagerly load the associated entities. I imagine other ORM's have similar facilities.
184.
▲
by
olavk
8y ago
What ORM setup gives you "many seconds" overhead on a small website? Are you sure the ORM is to blame? I suspect you are doing something like lazy loading in a loop or joining/filtering on the client side.
185.
▲
by
olavk
8y ago
> The query translation and hydration overhead of transforming the data into objects even in a fast language are always going to be problems No they are not. Have you measured this in a real-world application? This overhead is negligible
186.
▲
by
olavk
8y ago
What ORM's does not support joins?
187.
▲
by
olavk
8y ago
So like "the singularity" and "transhumanism" - millennia-old religious ideas, repackaged for a technological age.
188.
▲
by
olavk
8y ago
A graph database basically caches related entities with the root entity, so lookups are fast when the query follows the paths of the graph. The price is that any other query is extremely costly. But if it works for your use case, more power
189.
▲
by
olavk
8y ago
Maybe you are on to something. All the major ORM's are open source (AFAIK) so if you made a write-up of the common issues and how you suggest they could be detected by the ORM, I think it would be very well received.
190.
▲
by
olavk
8y ago
So you have to use sharding because your databases have limited capacity. But you can just join in the app, because the app have unlimited memory?
191.
▲
by
olavk
8y ago
They require rather sophisticated analysis to detect. A compiler will detect trivial errors, but will not flag if you are using an O(n) algorithm when an O(1) could be used. Not yet, anyway.
192.
▲
by
olavk
8y ago
I was with you some of the way but "making you avoid doing joins in the database" made me drop my monocle. You want joins in the database, they are designed for joins. Moving joins to the client will kill performance and scala
193.
▲
by
olavk
8y ago
> Why did you quote half my sentence, leaving out the part where I explain why, and then ask why? Sorry I just didn't want to quote the whole comment, didn't mean to imply I was only responding to the first part of the sentence
194.
▲
by
olavk
8y ago
What kind of database architecture could cause SELECT * to be slow?
195.
▲
by
olavk
8y ago
> Inefficiency exists even at small scales with ORMs ORMs are not inherently inefficient. And in my time I have seen plenty of n+1 style queries written with raw SQL.
196.
▲
by
olavk
8y ago
Depends on what kind of optimizations, and on the ORM I guess. The major problems described in the article, like n+1 queries and filtering on the client rather than in the database seem to be easier to fix in an ORM than in hand-written S
197.
▲
by
olavk
8y ago
I guess this depends on the framework in use, but for example, in Hibernate you add a single "include" clause to avoid n+1 queries. It is only "magic" if you don't understand how it works, but then your SQL would be
198.
▲
by
olavk
8y ago
Writing SQL by hand does not solve typical performance problems like n+1 queries. If on the other hand you know enough to avoid n+1 queries, then you can also avoid them when using an ORM, and save a lot of work. If you like writing SQL by
199.
▲
by
olavk
8y ago
The value proposition of ORM's is they simplify data access code, making the application simpler to write and more maintainable. I have never seen anybody claim ORMs would eliminate performance issues.
200.
▲
by
olavk
8y ago
Well I guess you can disprove particular forms of simulation - e.g. since a computer with 16GB RAM can be adequately simulated, we can reject the notion that the current universe is simulated on a computer with 16GB RAM or less. > The
201.
▲
by
olavk
8y ago
That is not what falsifiable means. Falsifiable means that an experiment can be devised which could result in observations which contradict the predictions of the theory.
202.
▲
by
olavk
8y ago
The problem is...you can even define what it means for the universe to be a simulation. You might as well argue like George Berkely that all sensations are signs and symbols directly from God - it is not even wrong. It is fundamentally un
203.
▲
by
olavk
8y ago
> Despite what seems to be a popular opinion, we are not actually obligated to curl up into a ball on the floor and cry about our inability to know anything I have no idea what you are referring to here. Can you be bit more specific abou
204.
▲
by
olavk
8y ago
> It is not a theory that is, strictly speaking, falsifiable, So in what ways is it a "serious theory"?
205.
▲
by
olavk
8y ago
I don't think any scientist should take it seriously. It is at the level of "maybe this is all just a dream". Well perhaps, but we have no way of knowing. It is an unfalsifiable hypothesis so it is outside the scope of scienc
206.
▲
by
olavk
8y ago
SQL and the relational model is designed for good performance rather than predictable performance. It may use statistics collected at runtime to improve performance, so this is not predictable - but it will be fast and getting faster. H
207.
▲
by
olavk
8y ago
IPv6 was designed in the early 90'ies where the internet looked very different - this was even before the web. Large scale changes were much easier to coordinate and roll out. I dont think the players at that time needed incentives bey
208.
▲
by
olavk
8y ago
I guess this depends on how it is taught. If it is just memorization of historical events then it probably wouldn't matter. But if the students are expected to try to understand the mindset of the people acting throughout history, then
209.
▲
by
olavk
8y ago
I think it is a valuable approach to art history, but I am doubtful it will work for history in general. Going backwards, looking for the causes of what happens later, is very prone to hindsight bias.
210.
▲
by
olavk
8y ago
It is not a question of beeing "tricked" into learning. It is just that we lean best when we start somewhere we can understand and relate to our current experiences and understanding of the world. Then learning from this point wil
More ›