SQLCheck

Dev tools

sql linter

SHOW HN2017

61points
26comments
#696of 2,242 in 2017
Top 32%of 2017 by points

How HN took it

RoastedHalf or more of the comments are critical

0 positive, 6 neutral or asking, 1 mixed, 7 critical, out of 14 comments about the project. Thread score -0.44.

Idea: 0 for, 4 againstDocs: 0 for, 3 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Interesting idea and useful as a hint tool.

    From 2 comments
    • The join one is particularly bad as it can make your query run much slower as running multiple queries is almost never a win. A check for the opposite (multiple queries when one…
      extrapickles on HN
    • Thanks for sharing these interesting anecdotes.
      jarulraj on HN

Objections

  • Some checks, like splitting queries and avoiding JOINs, may give bad advice.

    From 3 comments
    • The tests in this read like someone who has only used one SQL dialect, and wanted another project to show off C++ abilities. Its full of bad advice that does little to help…
      bsg75 on HN
    • The join one is particularly bad as it can make your query run much slower as running multiple queries is almost never a win. A check for the opposite (multiple queries when one…
      extrapickles on HN
    • Yup, the "CheckSpaghettiQuery" is a recipe for disaster. I have a query here that runs on a raspberry pi running postgresql with 7 GB of data (chat logs in a postgres table, with…
      kuschku on HN
  • Column prefixing and generic id naming are disputed.

    From 2 comments
    • https://github.com/jarulraj/sqlcheck/blob/master/docs/logical/1004.md Strongly disagree. Table columns should always be prefixed with table name. So users.user_id is one of the…
      Achshar on HN
    • This doesn't allow for finer semantics. Just "u.id" tells us what the thing is, but not its role in the schema. I don't think it's very unusual to do this. The most obvious…
      CWuestefeld on HN
  • Offset pagination check dismisses a real use case.

    From 2 comments
    • I feel like the author unjustly brushes aside the main benefit of using offsets for pagination (that is: the ability to query a specific page of results). Yeah, most page-based…
      yellowapple on HN
    • A complicated solution to something that is not a problem, at least for my lowly business CRUD apps.
      combatentropy on HN

Requests

  • Provide evidence that each flagged pattern is actually bad.

    From 1 comment
    • The join one is particularly bad as it can make your query run much slower as running multiple queries is almost never a win. A check for the opposite (multiple queries when one…
      extrapickles on HN
  • Add a check requiring column names to be table-prefixed.

    From 1 comment
    • Thanks for sharing your perspective. I will add a new check to ensure that table columns are always be prefixed with table name. However, I still think that it is worthwhile to…
      jarulraj on HN
  • Improve documentation for the join check.

    From 2 comments
    • Interesting. Some bones to pick: https://github.com/jarulraj/sqlcheck/blob/master/docs/query/3013.md First, dat implicit, inner join. Second, it could be written more clearly…
      snake_plissken on HN
    • Can you please open an issue or send a PR to update the documentation? Thanks!
      jarulraj on HN

Questions

  • Does it work with SQL dialects like T-SQL?

    From 1 comment
    • Sounds good in theory. but I wonder how well it works for any SQL dialects. I write SQL in a dialect like T-SQL usually. The tool would probably not recognize the brackets or…
      sebazzz on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/15016949)