Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment SQL code would be full of them (Score 1) 266

SQL Server's query planner gets better and better with every release, but it still screws up on a regular basis. To have efficient queries on SQL Server the programmer (in the absence of a full-time DBA) needs to know far more about the internals of the server than they really should. Some of the common issues for slowly running queries I see include:

  • Scalar UDFs (User-Defined Functions) are pure evil. Query Planner always estimates their cost at 0, no matter how complex their implementation. Scalar UDFs used in queries are run RBAR (Row By Agonizing Row) so their real world costs add up very, very quickly. If you absolutely must have Scalar UDFs in your system ensure that they perform no table accesses whatsoever and only operate on the provided parameters.
  • Closely related to Scalar UDFs, and for the same reason, Table Valued Functions can be evil as well. Prefer to use Inline Table Valued Functions (that do not contain BEGIN and END keywords) which behave more like Views. Query Planner can inline the code of ITVFs into the current statement and even optimize out whole chunks of code if it detects that they're unnecessary to complete the query.
  • Bad indexes. Indexes should be chosen based on cardinality so that the least number of B-Tree traversals are required to get to data, e.g.: prefer (InvoiceID, BusinessID) over (BusinessID, InvoiceID) as there'll be far more invoices than businesses in your system.
  • Out of date index statistics. Left to its own devices, SQL Server doesn't update indexes statistics anywhere near as frequently as it should. If you have an indexed table that's regularly having rows inserted and deleted (especially if you run a "soft deleting" system) you should consider updating statistics yourselves on a recurring schedule or after X rows have changed.
  • Every foreign key should be indexed, and, in the case of Composite Foreign Keys, the order of the FK items should match the column order and the asc/desc order of the referenced Primary Key indexes.
  • Also related to index statistics is something that bites new programmers all the time: Did you know that statistics for #Temp tables and ##Temp tables are cached between uses? i.e.: if you put indexes on #Temp and ##Temp tables in your queries you should immediately run update statistics...with fullscan on them before using the temp tables, otherwise Query Planner makes decisions based on what the same-named temp tables had last execution!
  • SQL Server's a mine field of bad performance for the unaware. I doubt it's much different in Oracle and MySQL/MariaDB.

Comment Re:Testing costs money (Score 5, Interesting) 419

It's probably due to the DRM push Microsoft named "PlayReady 3.0". Don't know about the Ryzen line, but the only difference in the newest Intel line up is the support for hardware-based DRM which is something required for PlayReady 3.0:

In an effort to placate the studios, Microsoft introduced "PlayReady 3.0" with the Windows 10 Anniversary update. PlayReady 3.0 is a hardware-based DRM (digital rights management) system that requires dedicated decoding hardware, either on the CPU or on the graphics card, preventing the video stream from being captured in software or via an external capture device.

REF: https://arstechnica.com/gadget...

Comment Re:Sounds clunky (Score 1) 159

Remote compilation isn't exactly unheard of, nor is it unusual.

For example, MonoGame developers on MacOS and Linux can't build .fx format effects (shaders) on their own systems because the fxb.exe tool required is Windows-only and also requires the XNA Framework installed on the Windows machine doing the work. This led to solutions like InfinitespaceStudios in the UK hosting an Azure service for all the non-Windows shader writers to use, even supplying a Nuget package to reference from the Content Pipeline tool. (A huge thanks, Dean!) But if you don't trust InfinitespaceStudios to do it for you they also supply all the source code so you can build and configure it youself on your own Windows server(/desktop) machines.

Comment Good luck with that (Score 1) 274

Elon Musk, the billionaire founder of electric car giant Tesla, has thrown down a challenge to the South Australian and federal governments, saying he can solve the state's energy woes within 100 days -- or he'll deliver the 100MW battery storage system for free.

The power problems in South Australia are due to the both the state and federal governments mothballing coal-fired power generation to satiate the Greens, so good luck getting anything out of them. A lot of SA's baseload power is imported from neighboring states and when the interconnects went offline last September due to storm damage the wind power network had nothing to synchronise to so dropped their power from the network as well. The coal-fired power station in Port Augusta, SA was shut down last year; the gas-fired power station in Torrens Island is running at half-power (AGL is blaming soaring gas prices, but they're a gas producer themselves, so the truth is they don't want to maintain the full facility) and the coal-fired power station in Hazelwood, Victoria will be shut down next month. It's only going to get worse. I don't see how adding a paltry 100MW of battery storage is going to help the matter.

Comment Re:Virtualization (Score 5, Informative) 140

I was going to suggest VirtualBox as well.

I routinely install Windows into VirtualBox guests that have no virtual LAN adapters configured (i.e.: no network access). The guests can only access: inserted optical discs and/or .iso files; authorized USB sticks; persistent/non-persistent VirtualBox shares.

The big downside, though, is accelerated graphics:

  • You pay a significant penalty for DirectX under VirtualBox.
  • The video drivers installed with VirtualBox Guest Additions have OpenGL support limited to API Level 2.1, so you can't run anything that requires OpenGL 3 or better.
  • The VBGA OpenGL driver implementation is also really quite flakey. e.g.: Blender won't work with it, but can be made to work if you download the OpenGL Software Driver from the Blender FTP site. Of course this horribly slow because, you know, no hardware acceleration.
  • Also the VBGA OpenGL drivers are disabled by default for Windows 8 or later guests. You can enable them by running the Guest Additions installer from the command line with switches and/or Registry hacks.

Comment Re:Stop changing what isn't broken MS. (Score 1) 249

Automatic updates were always turned on by default, so what you say is not quite true.

I have to call "bullshit" here. Microsoft wrote KB306525 to instruct users how to turn on Automatic Updates in Windows XP, Vista, 7 and 8.x precisely because Automatic Updates were *not* turned on by default.

It was only when Windows 10 was pending release that Microsoft started sneaking in unmarked "security update" patches that started turning on Automatic Updates for everybody and installing the Windows 10 upgrade stack.

Comment Re:What about Russian Shutdown Roulette? (Score 1) 249

Putting an unfamiliar operating system on a computer they have to use would literally be at least as disruptive as changing Windows' UI language to Japanese.

Funny you mentioned that, this is exactly why so many people complained about lost productivity (and functionality) when computers were forced to upgrade from Windows 7 to Windows 10.

Comment Re:Crazy Displays (Score 1) 111

I don't know why people want it on their computer, let alone their phone.

Because on a computer it's excellent in portrait mode for reading documents. At the moment I have a portrait screen on either side of my landscape screen. IDEs, Blender and video editors tend to stay on the landscape screen because their GUIs suck in portrait mode, but I keep reference documents open on each of the portrait screens for easy reading.

Slashdot Top Deals

I'd rather just believe that it's done by little elves running around.

Working...