Skip to main content
12 events
when toggle format what by license comment
May 31, 2023 at 22:44 comment added JimmyJames Actually, in Java the string literal optimization is why == works sometimes with strings. It has nothing to do with why you should use equals().
May 31, 2023 at 19:52 comment added candied_orange Let us continue this discussion in chat.
May 31, 2023 at 19:52 comment added JimmyJames Sorry, I really have no idea what you are talking about. What difference does it make if every use case is represented? You don't need 100 million rows to represent 6 small values in a DB.
May 31, 2023 at 19:51 comment added candied_orange @JimmyJames yes but if that's happening at a lower level you'd never see it.
May 31, 2023 at 19:49 comment added JimmyJames "It may be the DB optimizes this for you silently in the background." No. I am looking at the table. It has over 500 million rows which each have a separate PK value. "have to give it new row all over again." Yes, that's a better solution than adding the same values 100 million times.
May 31, 2023 at 19:49 comment added candied_orange I don't think I'm making this clear. It isn't about the number of rows. It's about if the data represents the results of every use case yet.
May 31, 2023 at 19:46 history edited candied_orange CC BY-SA 4.0
added 507 characters in body
May 31, 2023 at 19:40 comment added JimmyJames "Just means it hasn't happened yet" Exactly, that's the problem. Why hasn't it happened yet? Maybe after the 100 millionth row with exactly the same data is inserted, one of those rows (0.000001%) will be reused. Problem solved!
May 31, 2023 at 19:34 comment added candied_orange @JimmyJames Apart from the apps business rules nothing. But just because the existing data doesn't point two children at the same parent doesn't mean the app has a business rule not to point two children at one parent. Just means it hasn't happened yet.
May 31, 2023 at 19:24 comment added JimmyJames This doesn't make sense. Breaking up the table and keeping 100's of millions of duplicate rows (aside from surrogate keys) are two completely different things. What would you imagine prevents them from pointing two child rows to the same parent?
May 31, 2023 at 19:17 history edited candied_orange CC BY-SA 4.0
added 156 characters in body
May 31, 2023 at 19:11 history answered candied_orange CC BY-SA 4.0