互いの前職での先輩後輩である @kenchan と企画した論理削除 Casual Talks #1で、「論理削除しない」という話をしてきました。 話す内容が各話者で面白いほどかぶっていたのでなかなか大変でしたが、普段から言っている「論理削除するな」「削除じゃないからちゃんと機能を設計しましょう」という内容を話してきました。 他の方の話も、かぶっているようで新しい視点もあって、いち参加者としてもたいへん勉強になりました。
This table shows us which companies the experts have worked at and in which capacity, however the addresses refer to the company rather then the expert or their specialty, this violates 3NF. Put simply, this can be remembered as "Everything must provide a fact about the key, the whole key, and nothing but the key, so help me Codd". (Codd being the scientist who coined these forms.) Now at this poi
Share Facebook Twitter LinkedIn Mail Posted by, Thomas Park, Senior Software Engineer, Google BigQuery Many types of computations can be difficult or impossible to express in SQL. Loops, complex conditionals, and non-trivial string parsing or transformations are all common examples. What can you do when you need to perform these operations but your data lives in a SQL-based Big data tool? Is it po
The SQL LIKE operator very often causes unexpected performance behavior because some search terms prevent efficient index usage. That means that there are search terms that can be indexed very well, but others can not. It is the position of the wild card characters that makes all the difference. The following example uses the % wild card in the middle of the search term: SELECT first_name, last_na
SQL unleashed: 7 SQL mistakes to avoid SQL is a convenient way to manage and query your data, but badly written queries can tie up your database. Here are seven common SQL traps and how to avoid them. Database developers have it tough. Whether they use SQL Server, Oracle, DB2, MySQL, PostgreSQL, or SQLite, the challenges are similar. It's too easy to write queries that perform badly, that waste sy
You’re a developer, DBA, or sysadmin stuck with long running queries in SQL Server, and you need to do SQL Server performance tuning. I can help! I’m a consultant, and I do this for a living. I don’t keep anything secret – I’ll tell you how you can get started, or if you prefer, you can hire me for help, whichever’s easier. Here are the basic steps: Measure how fast the server is going now. Perfor
SQL (Structured Query Language) is a computer language aimed to store, manipulate, and query data stored in relational databases. The first incarnation of SQL appeared in 1974, when a group in IBM developed the first prototype of a relational database. The first commercial relational database was released by Relational Software (later becoming Oracle). Standards for SQL exist. However, the SQL tha
「SQLパフォーマンス詳解」という本を翻訳しました 2015-04-07 題の通り、「SQLパフォーマンス詳解」(原文タイトルSQL Performance Explained)という本を翻訳しました。PDF版と印刷版が上記サイトから購入できます。 (追記 2017年9月から、渋谷のBOOK LAB TOKYOさんでも印刷版を販売していただいています。輸送コストの関係で、サイトから購入するより若干安くなっています) リレーショナルデータベースにおいて、SQLとインデックスがどのように関連し、どのようにすればSQLのパフォーマンスを良くできるのかを解説した本です。特定のデータベース製品に焦点を当てた本は多数ありますが、この本ではOracle Database、PostgreSQL、MySQL、SQL Serverの4つのメジャーなリレーショナルデータベース製品を同時に扱っていて、それぞれのク
4月中旬ころになりますが、新著が出ます。SQLのパフォーマンスを主題にした本で、実行計画を読むことで、なぜこのSQLは遅いのか、あるいは速いのかをデータベースの内部動作まで把握して理解しよう、という趣旨です。 リレーショナルデータベースというのは、SQLという自然言語を模したインタフェースによって、低次のレイヤーを隠蔽する意図で作られたミドルウェアなので、本当は実行計画などという手続レベルの世界をユーザが覗き見るのは、本末転倒なところもあります。ただそうはいっても、現実にSQLが遅かったら原因を解析せざるをえないわけだし、大体本当にブラックボックスにしたいなら、なんでどのDBMSも実行計画を見られる手段なんか用意してるんでしょうね不思議ですね、という理想と現実の狭間で悩むエンジニアの方々に少しでもベターな解に辿りつけるアプローチを提示できれば、と考えております。 以下まえがきと章立てです。
SQL has gone out of fashion lately—partly due to the NoSQL movement, but mostly because SQL is often still used like 20 years ago. As a matter of fact, the SQL standard continued to evolve during the past decades resulting in the current release of 2016. In this session, we will go through the most important additions since the widely known SQL-92. We will cover common table expressions and window
DBを使っている時、どのテーブルがどのくらい容量を食っているか知りたいことがあると思う。 また今後のサイズ増加を見積もりたいとき、あるテーブルの1行あたりの平均バイトサイズも知りたいはず! PostgreSQLで見るべきところ pg_classのテーブルの relpagesがブロック数 reltuplesが行数 を表すらしい。 これらは実際にはプランナが用いる推測値。ANALYZEコマンドを打つとこれらの統計情報が更新されるので、ANALYZE直後にやるほうが正確。まぁ大抵、概算が知りたいだけなのであまり気にする必要ないかもしれないが。 ブロックサイズは8K(SHOW block_size;で確認可能)なので relpages / 128Mbytesのサイズを占領しているということ。 平均サイズは、バイト数で知りたいのでrelpages * 8192 / reltuplesすれば良い。0割
Sec ScanのないSQLをどうやって高速化するのか 本当に難しいのはここから。 例えば、Explain Analyzeの結果が下記のようなものだったら、どうしますか? どこにボトルネックがあるか、わかりますか? QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sort (cost=1568.27..1568.51 rows=96 width=260) (actual time=822.175..822.259 rows=
NTT オープンソースソフトウェアセンタ 板垣 貴裕 スロークエリ (時間のかかるSQL) を発見するまでの手順を解説します。スロークエリ分析と改善は以下の流れで行うことになります。この記事では主に 1. のスロークエリの特定方法について解説します。2.については『スロークエリの改善』を参考にしてください。 どのSQLが遅いのかを見つける。 そのSQLがなぜ時間がかかるのかを判断する。 設定パラメータ、SQL、スキーマなどを改善する。 着目したSQLの性能を再測定し、2. から繰り返す。 着目したSQLのチューニングが完了したら、他のボトルネックを探すため 1. から繰り返す。 スロークエリの見つけ方 スロークエリを見つけるには、大きく分けて統計情報ビューを使う方法と、サーバログを使う方法の2つがあります。統計情報ビューを使う方法は PostgreSQL 8.4 以降でしか利用できませんが
During Phase 1, only users who are logged in can access the AI chat feature. SQL Fiddle is free to use and ad-free! Want to help us? It takes 10 seconds Step 1: Like & Share our EFE Bulk Extensions videos Step 2: Like & Share our EFE Bulk Insert videos Thank During Phase 1, only users who are logged in can access the AI Editor feature. SQL Fiddle is free to use and ad-free! Want to help us? It tak
マンガでわかるデータベース 特定ベンダーの製品によらないデータベースの概念を、マンガでやさしく解説。果物の輸出に追われる王国の姫が、データベースによる解決策を1つ1つ学んでいくというストーリーをとおして、データベースの基本的な概念を身につけることができる。情報処理技術者試験対策にも役立つ練習問題付き。 SQLの絵本―データベースがみるみるわかる9つの扉 データベースを思いどおりに動かそう!見る・ためす・わかる!入門書 SQLはデータベースを操作するために覚えるべき技術ですが、難しくてなかなかものにできないという人も多いのではないでしょうか。本書は、かわいいイラストで解説しているので、直感的にイメージをとらえることができ、理解も進みます。さあ、扉を開いて、SQLの達人への道を進みましょう!
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く