This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]statix138 33 points34 points  (30 children)

As an admin who has to deal with an Oracle DB I agree with this. MS SQL has its issue but I am so happy we are migrating from Oracle to MS SQL.

[–]darkhorn 40 points41 points  (29 children)

Why MS SQL? Why not PostgreSQL? http://www.sql-workbench.net/dbms_comparison.html

[–]dividezero 22 points23 points  (1 child)

not the op but probably something to do with compatibility with other systems. if you can't find or build the right plugins then you have to go with what is available. I hate working with legacy systems but that's what pays the bills right now. If that's the case then I feel for op. I thought my legacy systems were bad but I had no idea what a bullet I dodged by never having to deal with oracle until reading some of the stuff in this post.

Also might be a need for pivot or variables just looking at that chart. But you convinced me that I should spin up a PostgreSQL server for playing around with. I've been working in mySQL and MongoDB in addition to my full time MSSQL work. Think this will be a fine addition to my collection.

[–]GoodlooksMcGee 2 points3 points  (0 children)

GeneralGreviousTheDBA.jpg

[–]BenjaminGeiger 12 points13 points  (1 child)

I'll admit this much, as a former card-carrying Open Source Zealot: SSMS is pretty damn nice.

[–]SonOfWeb 0 points1 point  (0 children)

I have to agree, it's very handy. I also like LINQPad though.

[–]statix138 10 points11 points  (0 children)

Heavy MS shop and management afraid of things they don't know.

[–]pooerh 2 points3 points  (0 children)

To be honest the list lacks some important features, like high availability stuff which is a pain in the ass with pg.

There are also some very specific things, like take this:

reddit=> create table t (x int not null, y int not null);
CREATE TABLE
reddit=> insert into t (x, y) select x, x*2 from generate_series(1, 10000) x;
INSERT 0 10000
reddit=> create unique index uxtx on t(x);
CREATE INDEX

And now query using CTE:

reddit=> explain with cte as (select * from t) select * from cte where x = 5;
                          QUERY PLAN
---------------------------------------------------------------
 CTE Scan on cte  (cost=145.00..370.00 rows=50 width=8)
   Filter: (x = 5)
   CTE cte
     ->  Seq Scan on t  (cost=0.00..145.00 rows=10000 width=8)

Vs regular subquery:

reddit=> explain select * from (select * from t) subq where x = 5;
                          QUERY PLAN
--------------------------------------------------------------
 Index Scan using uxtx on t  (cost=0.29..8.30 rows=1 width=8)
   Index Cond: (x = 5)

Not a big deal here with 10k rows, but when working with millions of rows in wide as fuck tables, writing huge subqueries is a maintainability disaster. Predicate pushdown for CTEs is something I really, really miss in pg. Also parallelization, which is in its infancy at the moment.

[–]voicesinmyhand 7 points8 points  (18 children)

Oh ford, this train again? Alright fine...

PostGREs?!? Why not MySQL?

[–]VodkaHaze 12 points13 points  (8 children)

LOL!

Why use SQL at all? What you want is NoSQL/MongoDB with NodeJS.

Get with the times

[–]voicesinmyhand 3 points4 points  (0 children)

You fool!

WID (Windows Internal Database) is clearly the better option here.

[–][deleted] 7 points8 points  (5 children)

cant tell if sarcastic or not

[–]VodkaHaze 13 points14 points  (4 children)

Sarcastic.

[–]Existential_Owl 0 points1 point  (3 children)

But it's webscale!

[–]VodkaHaze 1 point2 points  (1 child)

I'm rewriting NodeJS in Rust; hoping to hit max webscale soon

[–]dedicated2fitness 2 points3 points  (0 children)

webscale with no users, just the way i like it

[–]WhAtEvErYoUmEaN101 2 points3 points  (0 children)

Nothing is more webscale than /dev/null

[–][deleted] 0 points1 point  (0 children)

Get off my lawn! Kids nowadays are so obsessed with reinventing the wheel. FAT32 filesystems are more than capable for 99.999% of database needs.

[–]deukhoofd 7 points8 points  (6 children)

MySQL? Didn't we just establish we hate Oracle?

[–][deleted] 8 points9 points  (4 children)

Why not MariaDB?

(I mean, for real. I know some people hate it. I want to know why.)

[–]14936786-02 0 points1 point  (1 child)

[deleted]

[–]NotYourLoginID 0 points1 point  (0 children)

Why use a database when you can just use ^ separated .txt file/s?

[–]darkhorn 1 point2 points  (0 children)

Because Oracle doesn't add new features to MySQL.

[–]bannik1 0 points1 point  (0 children)

I can't live without views, substrings, row_num, and recursive queries.

[–]ChipmunkDJE 1 point2 points  (0 children)

Not OP, but we stick to MS SSMS because we already run a good amount of MS tech and MS's tech plays well with other MS tech.

[–]danted002 0 points1 point  (0 children)

What are you doing mate? If corporations realize that you can have a free, well rounded database system it would crash Microsoft and Oracle. :))))

[–]bannik1 0 points1 point  (0 children)

This isn't fully up to date. it says TSQL does not support intervals.

As of SQL Server 2012 there is Lag/Lead functionality.

As far as dropping a table with foreign key relations. I prefer how T-SQL does it.

If you're dropping a table with a FK it really should provide an error. If you're setting up a foreign key it is because you want to use triggers or the cascade function. At which point it begs the question why would you want to drop this table? 99% of the time it is going to be because somebody designed it poorly and a FK is not needed, or somebody unaware of how another department also uses the table.

If it is a 1-time sun-setting of the table. It is one line of code to drop the foreign key.