はてなブックマークアプリ

サクサク読めて、
アプリ限定の機能も多数!

アプリで開く

はてなブックマーク

  • はてなブックマークって?
  • アプリ・拡張の紹介
  • ユーザー登録
  • ログイン
  • Hatena

はてなブックマーク

トップへ戻る

  • 総合
    • 人気
    • 新着
    • IT
    • 最新ガジェット
    • 自然科学
    • 経済・金融
    • おもしろ
    • マンガ
    • ゲーム
    • はてなブログ(総合)
  • 一般
    • 人気
    • 新着
    • 社会ニュース
    • 地域
    • 国際
    • 天気
    • グルメ
    • 映画・音楽
    • スポーツ
    • はてな匿名ダイアリー
    • はてなブログ(一般)
  • 世の中
    • 人気
    • 新着
    • 新型コロナウイルス
    • 働き方
    • 生き方
    • 地域
    • 医療・ヘルス
    • 教育
    • はてな匿名ダイアリー
    • はてなブログ(世の中)
  • 政治と経済
    • 人気
    • 新着
    • 政治
    • 経済・金融
    • 企業
    • 仕事・就職
    • マーケット
    • 国際
    • はてなブログ(政治と経済)
  • 暮らし
    • 人気
    • 新着
    • カルチャー・ライフスタイル
    • ファッション
    • 運動・エクササイズ
    • 結婚・子育て
    • 住まい
    • グルメ
    • 相続
    • はてなブログ(暮らし)
    • 掃除・整理整頓
    • 雑貨
    • 買ってよかったもの
    • 旅行
    • アウトドア
    • 趣味
  • 学び
    • 人気
    • 新着
    • 人文科学
    • 社会科学
    • 自然科学
    • 語学
    • ビジネス・経営学
    • デザイン
    • 法律
    • 本・書評
    • 将棋・囲碁
    • はてなブログ(学び)
  • テクノロジー
    • 人気
    • 新着
    • IT
    • セキュリティ技術
    • はてなブログ(テクノロジー)
    • AI・機械学習
    • プログラミング
    • エンジニア
  • おもしろ
    • 人気
    • 新着
    • まとめ
    • ネタ
    • おもしろ
    • これはすごい
    • かわいい
    • 雑学
    • 癒やし
    • はてなブログ(おもしろ)
  • エンタメ
    • 人気
    • 新着
    • スポーツ
    • 映画
    • 音楽
    • アイドル
    • 芸能
    • お笑い
    • サッカー
    • 話題の動画
    • はてなブログ(エンタメ)
  • アニメとゲーム
    • 人気
    • 新着
    • マンガ
    • Webマンガ
    • ゲーム
    • 任天堂
    • PlayStation
    • アニメ
    • バーチャルYouTuber
    • オタクカルチャー
    • はてなブログ(アニメとゲーム)
    • はてなブログ(ゲーム)
  • おすすめ

    ノーベル賞

『EXPLAIN EXTENDED』

  • 人気
  • 新着
  • すべて
  • Happy New Year: GPT in 500 lines of SQL - EXPLAIN EXTENDED

    8 users

    explainextended.com

    Translations: Russian This year, the talk of the town was AI and how it can do everything for you. I like it when someone or something does everything for me. To this end, I decided to ask ChatGPT to write my New Year's post: "Hey ChatGPT. Can you implement a large language model in SQL?" "No, SQL is not suitable for implementing large language models. SQL is a language for managing and querying d

    • テクノロジー
    • 2024/01/06 08:28
    • SQL
    • AI
    • MySQL ORDER BY / LIMIT performance: late row lookups

      5 users

      explainextended.com

      From Stack Overflow: When I run an SQL command like the one below, it takes more than 15 seconds: SELECT * FROM news WHERE cat_id = 4 ORDER BY id DESC LIMIT 150000, 10 EXPLAIN shows that its using where and the index on (cat_id, id) LIMIT 20, 10 on the same query only takes several milliseconds. This task can be reformulated like this: take the last 150,010 rows in id order and return the first 10

      • テクノロジー
      • 2014/10/28 20:42
      • Happy New Year!

        6 users

        explainextended.com

        In one of my previous New Year's posts we drew snowflakes in PostgreSQL. The algorithm we used to create the snowflakes is an implementation of an L-system, which is an example of a fractal. There are many more beautiful objects we can see in the winter: frozen trees, frost patterns on windows, cracks on ice etc., all of them being fractals. Today we will be constructing escape-time fractals. To b

        • テクノロジー
        • 2014/01/03 14:37
        • SQL
        • Hierarchical queries in MySQL

          3 users

          explainextended.com

          We have a nice tree sorted as a tree, with rows indented according to the depth level. In the query above, START WITH defines the root of the tree, and CONNECT BY defines join condition between parent and child rows. Parent columns are defined by adding PRIOR keyword to them. In MySQL there is no such construct, but it can be emulated. We may try construct a sorting function somehow, but it will b

          • テクノロジー
          • 2012/03/22 21:32
          • mysql
          • DB
          • *あとで
          • NOT IN vs. NOT EXISTS vs. LEFT JOIN / IS NULL: PostgreSQL

            4 users

            explainextended.com

            Which method is best to select values present in one table but missing in another one? This: SELECT l.* FROM t_left l LEFT JOIN t_right r ON r.value = l.value WHERE r.value IS NULL , this: SELECT l.* FROM t_left l WHERE l.value NOT IN ( SELECT value FROM t_right r ) or this: SELECT l.* FROM t_left l WHERE NOT EXISTS ( SELECT NULL FROM t_right r WHERE r.value = l.value ) Let's see for PostgreSQL 8.

            • テクノロジー
            • 2011/07/27 11:09
            • postgresql
            • DB
            • 10 things in MySQL (that won't work as expected).

              6 users

              explainextended.com

              (I just discovered cracked.com) #10. Searching for a NULL SELECT * FROM a WHERE a.column = NULL In SQL, a NULL is never equal to anything, even another NULL. This query won't return anything and in fact will be thrown out by the optimizer when building the plan. When searching for NULL values, use this instead: SELECT * FROM a WHERE a.column IS NULL #9. LEFT JOIN with additional conditions SELECT

              • テクノロジー
              • 2010/11/07 08:33
              • mysql
              • sql
              • tips
              • MySQL: selecting a number of random rows fast

                3 users

                explainextended.com

                More than 13 seconds, and it's only a million rows. And financial databases may have billions. But do we really need sorting anyway? Say, we need to select 10 rows out of 1 000 000. If we just iterate the rows, which is the probability of each row to be selected on its turn? As no rows differ from each other for our purposes, each remaining row may be selected with equal probabilty. This means, th

                • テクノロジー
                • 2010/02/21 02:23
                • mysql
                • not-in-vs-not-exists-vs-left-join-is-null-mysql

                  7 users

                  explainextended.com

                  Which method is best to select values present in one table but missing in another one? This: SELECT l.* FROM t_left l LEFT JOIN t_right r ON r.value = l.value WHERE r.value IS NULL , this: SELECT l.* FROM t_left l WHERE l.value NOT IN ( SELECT value FROM t_right r ) or this: SELECT l.* FROM t_left l WHERE NOT EXISTS ( SELECT NULL FROM t_right r WHERE r.value = l.value ) Finally, it's MySQL time. A

                  • テクノロジー
                  • 2010/01/12 02:09
                  • MySQL
                  • sql
                  • Performance
                  • EXPLAIN EXTENDED

                    3 users

                    explainextended.com

                    Regular readers of my blog will be aware that SQL is an excellent tool for graphics. You can use it to draw snowflakes, fractals, ray-traced 3D pictures, and many other things. SQL art is beautiful, albeit slow to generate. These days they say AI is taking over, and human-made art will soon go the way of the dodo. The same fate awaits SQL-made art, I'm afraid. But you can't stop the progress. If y

                    • テクノロジー
                    • 2009/11/22 15:28
                    • database

                    このページはまだ
                    ブックマークされていません

                    このページを最初にブックマークしてみませんか?

                    『EXPLAIN EXTENDED』の新着エントリーを見る

                    キーボードショートカット一覧

                    j次のブックマーク

                    k前のブックマーク

                    lあとで読む

                    eコメント一覧を開く

                    oページを開く

                    はてなブックマーク

                    • 総合
                    • 一般
                    • 世の中
                    • 政治と経済
                    • 暮らし
                    • 学び
                    • テクノロジー
                    • エンタメ
                    • アニメとゲーム
                    • おもしろ
                    • アプリ・拡張機能
                    • 開発ブログ
                    • ヘルプ
                    • お問い合わせ
                    • ガイドライン
                    • 利用規約
                    • プライバシーポリシー
                    • 利用者情報の外部送信について
                    • ガイドライン
                    • 利用規約
                    • プライバシーポリシー
                    • 利用者情報の外部送信について

                    公式Twitter

                    • 公式アカウント
                    • ホットエントリー

                    はてなのサービス

                    • はてなブログ
                    • はてなブログPro
                    • 人力検索はてな
                    • はてなブログ タグ
                    • はてなニュース
                    • ソレドコ
                    • App Storeからダウンロード
                    • Google Playで手に入れよう
                    Copyright © 2005-2025 Hatena. All Rights Reserved.
                    設定を変更しましたx