Are the posted questions getting worse?

  • So, what do we all think of today's SQL 2019 announcement? I'm sure many of you were already aware behind the scenes, and they did also accidentally leak the news a few days ago, but still.

    https://www.mssqltips.com/sqlservertip/5710/whats-new-in-the-first-public-ctp-of-sql-server-2019/

  • The real fact of the matter is that whether or not T-SQL is actually declarative or not, doesn't actually matter.

    Some folks who seek to characterize and classify things are going to feel a need to use terms as a shortcut so they don't have to constantly restate a definition. 

    I often find myself in a role where I try to be instructive in how SQL Server (and heck, computers in general) work. It helps to teach a concept and be able to label it with a name. Heck I still land in roles where I myself need to be instructed, and if I understand what some terms mean then the unlucky individual tasked with getting me to understand something might be saved some effort 🙂

    I think that's why some folks like to call triangular joins "set oriented" for instance. We can discuss the performance problem of triangular joins by  discussing the sets that these queries declare.

  • TomThomson - Sunday, September 23, 2018 6:20 PM

    patrickmcginnis59 10839 - Tuesday, September 18, 2018 6:55 AM

    My thoughts are that the interesting parts of T-SQL are declarative, and in their absence T-SQL would just be a rather slow interpreted language with some database capabilities. I view the procedural elements of T-SQL and others as additions to allow turing complete programming when needed.
    ...
    ...
    I do agree that T-SQL has some imperative parts, I just think a major interesting part of T-SQL (ie., the non procedural SQL parts) should be allowed to be called declarative. I've taken a liking to using the "declarative" description in place of "set oriented". Obviously personal preference and an offered 2 cents worth of opinion!

    Well, any language in which a single statement manages to be non-declarative on its own would be rather nasty.  Currently single DML statements  are declarative, as are single  DDL statements.   

    The problem is that sequences of DDL and/or DML statements are not always declarative.  The language does partly address this, by providing explicit transactions - but that only does part of the job, as (a) the default isolation level (whether for SQL Server or Oracle or ...) allows a sequence of DML statements within a transaction to violate declarativeness and (b) a sequence with both DDL statements and DML statements can be non-declarative regardless of the isolation level.  Point (a) can be avoided by always using one of the two isolation levels which prevents phantom reads as (well as other anomalies) but I suspect that (b) is unavoidable unless one puts DDL and DML into separate transactions. Also sequences involving assignment of values to variables are usually not declarative, but that's not really interesting.  So it's generally (but not always) possible to write declaratively in SQL.  But regrettably most developers working in SQL can't think declaratively (in fact most even don't know what "declarative" means) so most SQL actually written is not declarative.

    I've had pretty good luck in getting people to think declaratively. SQL helps here with its select and update syntax, plus many people start off by doing queries with designers. Isolation modes seem to be more difficult.

    I would be interested in why queries written in some lower isolation modes would not be declarative. Would that be because "imperative" implications are leaking into the query, like subqueries being run in a particular order as compared to the parent query?

  • Beatrix Kiddo - Monday, September 24, 2018 8:15 AM

    So, what do we all think of today's SQL 2019 announcement? I'm sure many of you were already aware behind the scenes, and they did also accidentally leak the news a few days ago, but still.

    https://www.mssqltips.com/sqlservertip/5710/whats-new-in-the-first-public-ctp-of-sql-server-2019/

    Thanks for the link Beatrix. I'll have a proper read through later, however I did note no mention of support for SSRS, SSAS, SSIS, SSMS (I don't know SOS) for Linux. personally I really think they should be focusing on getting SQL Server on Linux and SQL Server on Windows to be (more or less) on par with each other. The article does, however, does appear to only focus on the DBMS, so it might just be that it's not mentioned as it's not focusing on those parts of the product. I'd really like to see a better equivalency between the 2 products.

    On a positive note, Table variable deferred compilation could be a good step in the right direction. Query-scoped compatibility level hints is very interesting though.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • patrickmcginnis59 10839 - Monday, September 24, 2018 8:25 AM

    The real fact of the matter is that whether or not T-SQL is actually declarative or not, doesn't actually matter.

    Some folks who seek to characterize and classify things are going to feel a need to use terms as a shortcut so they don't have to constantly restate a definition. 

    I often find myself in a role where I try to be instructive in how SQL Server (and heck, computers in general) work. It helps to teach a concept and be able to label it with a name. Heck I still land in roles where I myself need to be instructed, and if I understand what some terms mean then the unlucky individual tasked with getting me to understand something might be saved some effort 🙂

    I think that's why some folks like to call triangular joins "set oriented" for instance. We can discuss the performance problem of triangular joins by  discussing the sets that these queries declare.

    Heh... totally agreed.  It's much easier to say that T-SQL is "Declarative", especially when that has become (right or wrong), the generally accepted term.

    Shifting gears to "Triangular Joins", I recently solved a nasty problem by using a loop to simulate a "Triangular Join Reduction of Data" for "thumbprint matching of documents".  It took it down from nearly two minutes per document to about a second for more than 52 "match criteria" where there were multiple similar matches.  It's one of those "everything must match" and there are 10's of thousands of thumbprints.  It was fun stuff and SQL Server actually puked on the set-based method.  The "managed code" that was doing the matching was an expanding set of Cartesian Products and that's why it took so bloody long.  That and RBAR on steroids.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • SQL Server 2019 was not the only announcement coming out today. Keep watching. Cool stuff ahead.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey - Monday, September 24, 2018 9:12 AM

    SQL Server 2019 was not the only announcement coming out today. Keep watching. Cool stuff ahead.

    Is there a specific page/blog you recommend keeping an eye on at all, Grant?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Monday, September 24, 2018 9:16 AM

    Grant Fritchey - Monday, September 24, 2018 9:12 AM

    SQL Server 2019 was not the only announcement coming out today. Keep watching. Cool stuff ahead.

    Is there a specific page/blog you recommend keeping an eye on at all, Grant?

    Tease. I feel like a little kid waiting for Santa now.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • And after more than a decade of being an open item, still no built in Tally or sequence creation function. <headdesk>

    The last few times we've requested this from MS development, they have pushed back that this is not worth their time. It's too easy to create in T-sQL, so they consider this syntactic sugar not worth adding or having to maintain/test.

    I disagree,but not sure what to do here. I could make a feedback item and really get lots of votes, but that has had mixed success.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • And no BULK EXPORT either. :crying:

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Monday, September 24, 2018 9:28 AM

    Also, no fix for the built-in splitter function <headdesk><headdesk><headdesk>,

    Why I still promote DelimitedSplit8K. Although an OPENJSON method I was introduced to recently works very well in SQL Server 2017, and doesn't suffer the 4000/8000 max character issue. It is, however, SQL Server 2017 specific, which I don't have at the office.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Monday, September 24, 2018 9:36 AM

    Jeff Moden - Monday, September 24, 2018 9:28 AM

    Also, no fix for the built-in splitter function <headdesk><headdesk><headdesk>,

    Why I still promote DelimitedSplit8K. Although an OPENJSON method I was introduced to recently works very well in SQL Server 2017, and doesn't suffer the 4000/8000 max character issue. It is, however, SQL Server 2017 specific, which I don't have at the office.

    Be careful with the OPENJSON, it has a bit of a performance bomb built in, here is one graph from a document I wrote on the issue
    😎

  • Eirikur Eiriksson - Monday, September 24, 2018 9:54 AM

    Be careful with the OPENJSON, it has a bit of a performance bomb built in, here is one graph from a document I wrote on the issue
    😎

    What do those axis' represent Eirikur?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Monday, September 24, 2018 9:59 AM

    Eirikur Eiriksson - Monday, September 24, 2018 9:54 AM

    Be careful with the OPENJSON, it has a bit of a performance bomb built in, here is one graph from a document I wrote on the issue
    😎

    What do those axis' represent Eirikur?

    Duration, data length and cardinality, will see if I can publish this as an article here, lots of work gone into this research.
    😎
    In short, 4440 items+ will bomb the performance.

  • Thom A - Monday, September 24, 2018 9:36 AM

    Jeff Moden - Monday, September 24, 2018 9:28 AM

    Also, no fix for the built-in splitter function <headdesk><headdesk><headdesk>,

    Why I still promote DelimitedSplit8K. Although an OPENJSON method I was introduced to recently works very well in SQL Server 2017, and doesn't suffer the 4000/8000 max character issue. It is, however, SQL Server 2017 specific, which I don't have at the office.

    There is an OPENJSON method?  I must be under a rock.

Viewing 15 posts - 62,311 through 62,325 (of 66,712 total)

You must be logged in to reply to this topic. Login to reply