<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: SigmundA</title><link>https://news.ycombinator.com/user?id=SigmundA</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 23 Apr 2026 10:53:50 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=SigmundA" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by SigmundA in "What game engines know about data that databases forgot"]]></title><description><![CDATA[
<p>Because there is a whole section that describes column based storage without mentioning that some databases have column based storage as an option.</p>
]]></description><pubDate>Thu, 09 Apr 2026 19:11:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=47708309</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47708309</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47708309</guid></item><item><title><![CDATA[New comment by SigmundA in "What game engines know about data that databases forgot"]]></title><description><![CDATA[
<p>>Cache locality by default. In a traditional row store, reading all player positions means loading entire rows — names, inventories, health, everything. Most of those bytes are wasted.<p>Not one mention of column stores? This didn't come from ECS...<p><a href="https://en.wikipedia.org/wiki/Data_orientation" rel="nofollow">https://en.wikipedia.org/wiki/Data_orientation</a></p>
]]></description><pubDate>Thu, 09 Apr 2026 19:02:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=47708196</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47708196</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47708196</guid></item><item><title><![CDATA[New comment by SigmundA in "Data centers are transitioning from AC to DC"]]></title><description><![CDATA[
<p>The batteries and phone lines were one system at -48v with power supplies converting AC power to DC while grid / generator is up.<p>The batteries are floated at the line voltage nothing was really charging or discharging and there was no switchover.<p>This is similar to your cars 12v dc power system such the when the car is running the alternator is providing DC power and the batteries float doing nothing except buffering large fluctuations stabilizing voltage.</p>
]]></description><pubDate>Wed, 25 Mar 2026 11:18:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=47515851</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47515851</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47515851</guid></item><item><title><![CDATA[New comment by SigmundA in "Urea prices"]]></title><description><![CDATA[
<p>Not sure what your point is, I was talking primarily about Class 8 heavy duty commercial trucks (semi) and other medium duty commercial use.<p>All the stuff that makes up emissions gear is highly recyclable and in fact some of it very desirable which is why people are getting catalytic converters stolen. So I do not worry about it filling up a land fill.<p>I also don't worry about EV batteries filling landfills because again they are very high grade ore for new batteries, once we have enough in circulation we no longer need to mine much lithium or rare earth.<p>I agree it should be reliable and repairable and forcing the manufacturers to have very long warranties on it seems like a good way to do that, having followed the various generations of DEF systems for the last decade the manufacturers have been making big strides because it costs them otherwise and has.<p>I also think airplanes using lead is stupid, but that is a fraction of even private diesel pickup usage let alone commercial trucking. Diesel pickups are at least 10% of all pickup sales now days.</p>
]]></description><pubDate>Thu, 12 Mar 2026 03:31:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=47346104</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47346104</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47346104</guid></item><item><title><![CDATA[New comment by SigmundA in "Urea prices"]]></title><description><![CDATA[
<p>No the DEF systems tend to break down and its mandated the engine go into limp mode when they do, this is hated by those that do not care for emissions and one of the biggest reason to delete by truckers. Also costly to fix the systems out of warranty.<p>You can find instructions on how to make DEF simulators using raspi's to fool the ECU into think the DEF system is working, people who do care about emissions will still carry these for emergency so they continue on their trip and get to a shop later. The derate was over zealous for sure and was a bad policy.<p>Also DPF is a performance issue since it blocks the exhaust to some degree, same with catalytic converter with def nozzle so no its not just EGR at all. DPF also consumes more fuel for regens.<p>2027 diesel regulations was to mandate even more NOx control but also specified manufacturers were required to have 100,000 mile 10 year warranty on emissions systems, its 5 year, 50k now. I believe thats dead in the water now.<p>A diesel engine with a deleted SCR system puts out 40 times the NOx of a working one. Thats 40 trucks going down the road to 1 equivalent. NOx causes asthma and acid rain, its not for the environment as much as for you directly.</p>
]]></description><pubDate>Thu, 12 Mar 2026 03:03:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=47345879</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47345879</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47345879</guid></item><item><title><![CDATA[New comment by SigmundA in "Urea prices"]]></title><description><![CDATA[
<p>There are three main emissions control systems in diesels, the Exhaust Gas Recirculation (EGR), Diesel Particulate Filter (DPF) and Selective Catalytic Reduction (SCR) which uses Diesel Exhaust Fluid (DEF).<p>Any or all can be "deleted" and is a crime to do so. All 3 systems add complexity and potentially reduce performance which is why those who don't care about emissions like to get rid of them.<p>Before DEF NOx regulations steadily went up engine manufacturers relied on increasing amounts of EGR to control NOx until it was not tenable, once DEF systems where implemented they could back off EGR increasing performance but not as much as ripping it all out and tuning for no care of emissions.<p>There are EGR free engines that rely entirely on DEF to control NOx but they are not for on-road use in the US thus far.</p>
]]></description><pubDate>Thu, 12 Mar 2026 02:55:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=47345817</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47345817</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47345817</guid></item><item><title><![CDATA[New comment by SigmundA in "Urea prices"]]></title><description><![CDATA[
<p>Saw posters on /r/Truckers complaining that truck stops were taking advantage of situation to gouge for DEF too on top of diesel before someone pointed out that Iran is the second largest producer of urea, the primary component of DEF. They are not happy right now with $5.00 / gal fuel and higher DEF as well.<p>Worried the administration will use it as an excuse to rollback NOx emissions regulations that mandated DEF usage in diesel engines. They are already not enforcing "deletes" of the emissions systems which is a federal crime.</p>
]]></description><pubDate>Thu, 12 Mar 2026 02:41:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=47345723</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47345723</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47345723</guid></item><item><title><![CDATA[New comment by SigmundA in "Nobody ever got fired for using a struct"]]></title><description><![CDATA[
<p>There is a lot of space between no acknowledgment at all like this article and tracing down the exact origin of who and when invented to null bit map in what system.<p>Your version comes off as self promotion, going into detail how to implement a the technique with out once calling it a common technique or even mentioning its widely used in the industry to solve the problem you are solving.<p>It would be like saying finding rows in storage is slow so we implemented a b-tree in a separate structure for certain columns and go into detail how to create a b-tree, calling it a "trick" while never once acknowledging the is the most common form of indexing in RDBMS's, would you understand how this would seem strange?</p>
]]></description><pubDate>Sun, 08 Mar 2026 15:18:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=47298015</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47298015</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47298015</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>>You're the one saying a 2 character string is somehow a space savings. If we're going to split hairs that finely then you have to know that any row with a variable length string makes the entire row/index variable length and that is a net storage and performance loss.<p>The row is always variable lengths as a structure it has flags noting how many columns there are with values and if there is a variable length section or not, only rows with no variable length fields at all has no variable length section and that is a bit flag check in the header.<p>You are making a non argument, variable length fields can be a space savings over an int with single char codes which is very common, and do not impact performance in any meaningful way. Besides that one could use fixed length chars and still get the other benefits I mentioned while having the same exact space usage and processing as a fixed length ints.<p>>That's not what happens but what happens is that somebody renames New York to New Eburacum<p>Changing the descriptive meaning of an entry causes all sorts of problems and even more so if it is a int because it's completely opaque its much harder to see an issue in the system because everything is a bunch of ints that do not correlate in any way to their meaning.<p>Changing the description to something that has the same meaning worded differently is usually not an issue and still gives good debug visibility to the value. If you and your users consider New Eburacum synonymous with New York, then having the code stay 'NY' should not be an issue and still be obvious when querying the data.<p>Unless someone is using the short code in a user visible way and it has to be updated. State is a common one that does this and nobody is changing state names or codes because it is a common settled natural key.<p>In the rare situation this actually needed to be done then one can update existing data, this is a not an issue in practice. You have the be extremely cautious updating the description of a code because much data was entered under the previous description and the meaning that it carries, having the code have some human meaning makes it more obvious to maintainers this should be done with care, many times it would involve deprecating the old one and making a new one with a different code because they have different meanings, having a table instead of a enum allows other columns to have this metadata.<p>This is not the same issue as say using a SSN for a person ID.</p>
]]></description><pubDate>Sun, 08 Mar 2026 13:38:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=47297238</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47297238</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47297238</guid></item><item><title><![CDATA[New comment by SigmundA in "Nobody ever got fired for using a struct"]]></title><description><![CDATA[
<p>Interesting so you don't find it odd that an article about the storage engine of a SQL database system explains the solution to problem without once mentioning that it is the way most other sql database engines solve it? It is mentioned several times sql table are typically sparse, but not that this is how its typically solved, only this is how you solved it...<p>>The fix is simple: we stop storing Option<T> and instead we store a bitmap that records which fields are None.<p>Right here would have been the opportunity to let those not familiar with database internals know. Something like "This technique has been widely used in many RDBMS systems over the years, you can see the PG version of this in their documentation for page layout".<p>Instead you go into detail on what a null bitmap is and how to implement it, calling it a "trick". Which is strange if you think your target audience is assumed to already know this common technique.<p>I mean not one mention of the origin of the trick or even calling it a common solution to this problem...</p>
]]></description><pubDate>Sun, 08 Mar 2026 04:46:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=47294482</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47294482</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47294482</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>>Sure they do, because now your row / index is variable length rather than fixed length. Way more complicated.<p>Come on its literally a 2 byte per column header in the row so it just sums the column lengths to get the offset, it does the same thing for fixed length except it gets the col length from the schema.<p>It's not much more complicated than a fixed length column only the column length is stored in row vs schema. I am not sure where you are getting this idea it way more complicated, nor the 3 vs 4 byte thing, the whole row is a variable length structure and designed as such, null values change the row length fixed or variable data type and have to be accounted for since a null takes up no space in the column data its only in the null bitmap.<p>> what's the point of user-configuration of someone hard-codes 'NY' in a query or in the code<p>Because it doesn't matter, 'NY' isn't changing just like 11 the int wouldn't change, but 'NY' is way easier to understand and catch mistakes with and search for code without hitting a bunch of nonsense and distinguish when 10 columns are all coded next to each other in a result set.<p>I prefer my rows to be a little more readable than 1234, 1, 11, 2, 15, 1 ,3 and the users do too.<p>I have had my fill of transposition bugs where someone accidentally uses the wrong int on a pk id from a different table and still gets a valid but random result that passes a foreign key check almost enough for me to want to use guid's for pk's almost. At least with the coded values it is easier to spot because even with single character code people tend to pick things that make sense for the column values you know 'P' for pending, 'C' for complete etc, vs 1 2 3 4 used over and over across every different column with an auto increment.</p>
]]></description><pubDate>Sun, 08 Mar 2026 03:15:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=47294037</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47294037</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47294037</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p><a href="https://en.wikipedia.org/wiki/Natural_key" rel="nofollow">https://en.wikipedia.org/wiki/Natural_key</a> you should have learned learn this in your courses.<p>Clam down, I am not suggesting using this for actual domain entity keys, these are used in place of enums and have their advantages. I have doing this a long time and it has not bit me, I have also seen many other system designed this way as well working just fine.<p>Using an incrementing surrogate key for say postal state code serves no purpose other than making things harder to use and debug. Most systems have many code values such as this and using surrogate key would lead to a bunch of overlapping hard to distinguish int data that leads to all sorts of issues.</p>
]]></description><pubDate>Sun, 08 Mar 2026 00:34:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=47293050</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47293050</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47293050</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>The check is added if it sees a varchar column and nvarchar parameter predicate on it.<p>It currently just does a scan in that situation which orders of magnitude more expensive with a cast for every row vs a single extra cast check on the single parameter value that may avoid all those other casts in a common situation.<p>There is no planning overhead, it's already detecting the situation. The execution overhead is a single extra cast on top of the cast per row, so n+1 vs n with the potential to eliminate n with a very common charset.</p>
]]></description><pubDate>Sat, 07 Mar 2026 21:18:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=47291577</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47291577</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47291577</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>>Enums are for non user-configurable values<p>In the systems I work with most coded values are user configurable.<p>>But those should have an auto-integer primary key and if you need the description, join for it.<p>Not ergonomic now when querying data or debugging things like postal state are 11 instead of 'NY'<p>select * from addresses where state = 11, no thanks.<p>Your whole results set becomes a bunch of ints that can be easily transposed causing silly errors. Of course I have seen systems that use guids to avoid collision, boy is that fun, just use varchar or char if your penny pinching and ok with fixed sizes.<p>>the length of the string is stored as an int<p>No it's stored as a smallint 2 bytes. So a single character code is 3 bytes rather than a 4 byte int. 2 chars is the same as an int. They do not complicate storage access in any meaningful way.<p>You could use smallint or tinyint for your primary key and I could use char(2) and char(1) and get readable codes if I wanted to really save space.</p>
]]></description><pubDate>Sat, 07 Mar 2026 21:03:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=47291471</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47291471</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47291471</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>It should not return incorrect results, if the nvarchar only contains ascii it will cast perfectly, if it doesn't then do the slow scan path, it's a simple check and the same work its doing for every row in the current behavior except one time and more restricted. Can you give me an example of an incorrect result here?<p>I am not talking about the default cast behavior from nvarchar to varchar, but a specific narrow check the optimizer can use to make decision in the plan of ascii or not with no information loss because it will do the same thing as before if it does not pass the one time parameter check.<p>By far the most common cause of this situation is using ascii only in a nvarchar because like say in this example the client language is using an nvarchar equivalent for all strings, which is pretty much universal now days and that is the default conversion when using a sql client library, one must remember to explicitly cast rather than the db doing it for you which is the expected behavior and the source of much confusion.<p>This would be purely an optimization fast path check otherwise fall back to the current slow path, correct results always with much faster results if only ascii is present in the string.</p>
]]></description><pubDate>Sat, 07 Mar 2026 15:29:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=47288497</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47288497</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47288497</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>The non sargeablilty is an optimizer deficiency IMO. It could attempt to cast just like this article is doing manually in code, if that success use index, if it fails scan and cast a million times the other way in a scan.</p>
]]></description><pubDate>Sat, 07 Mar 2026 12:26:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=47287043</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47287043</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47287043</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>We are talking nvarchar here, yes UTF-8 solves this issue completely and MSSQL supports it now days with varchar.</p>
]]></description><pubDate>Sat, 07 Mar 2026 12:21:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=47287007</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47287007</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47287007</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>Mostly agree separate tables can have multiple attributes besides a text description and can be exposed for modification to the application easily so users or administrators can add and modify codes.<p>A common extra attribute for a coded value is something for deprecation / soft delete, so that it can be marked as no longer valid for future data but existing data can remain with that code, also date ranges its valid for etc, also parent child code relationships.<p>Enums would be a good feature but they have a much more limited use case for static values you know ahead of time that will have no other attributes and values cannot be removed even if never used or old data migrated to new values.<p>Common real world codes like US postal state can take advantage of there being agreed upon codes such as 'NY' and 'New York'.</p>
]]></description><pubDate>Sat, 07 Mar 2026 12:15:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=47286955</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47286955</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47286955</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>It can run it for a range of values: <a href="https://learn.microsoft.com/en-us/sql/relational-databases/performance/parameter-sensitive-plan-optimization?view=sql-server-ver17" rel="nofollow">https://learn.microsoft.com/en-us/sql/relational-databases/p...</a><p>Also the simpler and maybe better approach is just make the decision every time as an operation in the plan, attempt the cast if it fails then scan and cast a many times the other way, if it succeeds then use the index, this isn't hard and adds one extra cast attempt on the slow path otherwise it does what everyone has to do manually in their code like this article but transparently.<p>The adaptive join operator does something much more complex: <a href="https://learn.microsoft.com/en-us/sql/relational-databases/performance/joins?view=sql-server-ver17#adaptive" rel="nofollow">https://learn.microsoft.com/en-us/sql/relational-databases/p...</a></p>
]]></description><pubDate>Sat, 07 Mar 2026 12:03:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=47286868</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47286868</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47286868</guid></item><item><title><![CDATA[New comment by SigmundA in "C# strings silently kill your SQL Server indexes in Dapper"]]></title><description><![CDATA[
<p>How do you store them? Also enums are not user configurable normally. It would be a good feature to have them, but they don't work well in many cases.<p>Typical code tables with code, description and anything else needed for that value which the user can configure in the app.<p>Sure you can use integers instead of codes, now all your results look like 1, 2, 3, 4 for all your coded columns when trying to debug or write ad-hoc stuff. Also ints are not variable length so your wasting space for short codes and you have to know ahead time if its only going to be 1,2,4 or 8 bytes.</p>
]]></description><pubDate>Sat, 07 Mar 2026 11:59:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=47286841</link><dc:creator>SigmundA</dc:creator><comments>https://news.ycombinator.com/item?id=47286841</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47286841</guid></item></channel></rss>