You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Cloud SQL Enterprise Plus エディションを発表:新エディションでは MySQL のパフォーマンスが最大 3 倍に向上 ※この投稿は米国時間 2023 年 7 月 12 日に、Google Cloud blog に投稿されたものの抄訳です。 Cloud SQL は、MySQL、PostgreSQL、SQL Server のワークロードを実行するための Google Cloud のエンタープライズ対応フルマネージド データベース サービスです。デジタルサービスから銀行、小売業まで幅広い業界で利用されており、現在 Google Cloud を活用している上位 100 社のうち 95% 以上のお客様が Cloud SQL を利用しています。より要求の厳しいワークロードがクラウドに移行するにつれ、より高いパフォーマンスと可用性を求める声が聞かれるようになりました。さらに、個々
概要 元サイトの許諾を得て翻訳・公開いたします。 英語記事: Solid Queue & understanding UPDATE SKIP LOCKED - BigBinary Blog 原文公開日: 2024/01/23 原著者: Chirag Shah サイト: BigBinary Blog 日本語タイトルは内容に即したものにしました。 参考: 週刊Railsウォッチ20240117: Solid Queue: 37signalsによるActive Job向けDBベースのジョブバックエンド 🔗 Solid Queueについて 最近になって、37signalsがSolid Queueをオープンソースとして公開しました(関連記事)。 Solid QueueはActive Jobで利用できるクエリバックエンドであり、データベース上に構築されます(これと対照的に、SidekiqやResqu
メジャーアップグレードを先延ばしした場合のTCOと移行コストを比較しましょう。 延長サポート移行時のマイナーバージョンアップグレード方法 延長サポートは、特定のマイナーバージョンでのみサポートされています。 RDSを例に取ると、MySQLは5.7.44、PostgreSQLは11.22です。 マイナーバージョンの自動アップグレードを有効にしている場合、すでにこの最新マイナーバージョンにアップグレードされているはずです。 無効にしている場合、標準サポートの終了に伴い、延長サポート対象バージョンへ自動アップグレードされます。 ただし、自動アップグレードの実施タイミングは言及されておらず、メンテナンスウィンドウ中に実施される保証はありません(2024/01/10確認)。 アップグレードのタイミングをコントロールしたい場合、標準サポートが終了する前に、以下のどちらかを実施してください。 手動で実行
AWS Database Blog Local write forwarding with Amazon Aurora Applications designed in the cloud need to be able to scale. For stateless resources like application servers, this is a straightforward task and can be achieved by simply adding additional compute resources behind a load balancer. For stateful resources such as databases, scaling can be more challenging. With the release of Amazon Aurora
1. インデックス MySQLで利用可能なインデックスは一部を除き、B-Treeインデックスと呼ばれる構造でできてます。Bツリーインデックスは、ブランチノード(ブランチ), リーフノード(リーフ)で構成されており、ルートノードから数ステップで目的のデータに到達することができます。 データの格納とアクセス方法 クラスタインデックス MySQLのInnoDBストレージエンジンでは、すべてのテーブルは主キー(PRIMARY KEY)によるクラスタインデックスを持ちます。クラスタインデックスとは、データ行が主キーの値によって物理的に順序付けられた状態のことを指します。このため、主キーによる検索は非常に高速です。 セカンダリインデックス セカンダリインデックスは、クラスタインデックス以外のすべてのインデックスを指します。セカンダリインデックスのリーフページ(最下層のインデックスページ)には、インデッ
On Saturday 8 July 2023, user accounts started disappearing from the Vivaldi Social Mastodon instance. What was going on, how did this happen, and what were the consequences? This is a very long blog post, but to be fair, this was also to be a very long weekend. If you want to skip to the conclusion, there’s a TL;DR (too long; didn’t read) section at the end. Something’s not right It was around 17
こんにちは。アルダグラムでエンジニアしている森下霞です。 弊社では、MySQL のデータベース と Ruby on Rails を使用しています。 先日、モニタリングで UPDATE IN SELECT のクエリでデッドロックの発生に気づき、調査し、修正ができたため、デッドロックのデバッグ方法と解決策を紹介したいと思います。 背景 今回の問題は、アニメサービスを例に使って説明します。アニメは以下のテーブルで保存します。 CREATE TABLE anime ( id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, genre VARCHAR(100) NOT NULL, sort_order INT NOT NULL DEFAULT 0 ); CREATE INDEX index_anime_on_
import sys import json import boto3 import ast import os import snowflake.connector import pymysql from snowflake.connector import DictCursor from sqlalchemy import create_engine from sqlalchemy.sql import text from datetime import datetime def lambda_handler(event, context): # 今日の日付とSQLを実行する日時を変数で用意 today = datetime.now() updated_at_str = datetime.strftime(today, '%Y-%m-%d %H:%M:%S') ## Snowflake
AWS Database Blog Introducing Amazon Aurora MySQL enhanced binary log (binlog) Amazon Aurora is a MySQL and PostgreSQL-compatible relational database built for the cloud. Aurora combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open-source databases. Aurora has a history of innovating around database engines and the underlyi
gem の概要 database_rewinder という gem があります。 これを使うとテストケースを実行するたびに DB の中身が初期化されて、しかも超速いというすごい gem です。 弊社でもヘビーユースさせていただいていたのですが、あるプロダクトの自動テストにおいて適切にデータが初期化されないケースがあり、 Flaky test の原因となっていました。 今回ご紹介する mysql_rewinder は、この問題を解決するために database_rewinder の代替を目指して開発した gem です。 使用例 Ruby on Rails / RSpec と組み合わせる場合、以下のように利用します。 RSpec.configure do |config| # MysqlRewinder の初期設定 config.before(:suite) do db_configs = A
⇦ 2024-04-03 Postgres Locks Explorer Details/sources Postgres table-level locking docs Postgres row-level locking docs django-pg-zero-downtime-migrations A more comprehensive list of queries with locks - at some point I may add these into this site All of the data in this page is derived from these tests, so is true by some definition of true. Notable is this test - given an arbitrary SQL statemen
We’re excited to introduce pg_analytics, an extension that accelerates the native analytical performance of any Postgres database1 by 94x. With pg_analytics installed, Postgres is 8x faster than Elasticsearch and nearly ties ClickHouse on analytical benchmarks2. Today, developers who store billions of data points in Postgres struggle with slow query times and poor data compression. Even with datab
この記事はNTTコムウェア Advent Calendar 2023の4日目の記事です。 こんにちは、NTTコムウェアの平塚です。今月は2023冬 Chill Seasonで手に馴染むブキを探しているところです。 大規模言語モデルが持っていない最新情報や企業内情報を補うためのRAG(Retrieval Augmented Generation、検索拡張生成)というアーキテクチャーがあります。ごく簡単に説明すると、外部データベースを用意してそこで検索した結果を大規模言語モデルに説明させるというものです。以下はRAGのイメージ図です。 現在多くの企業さまがRAGの検証に取り組んでいるところかと思います。今回RAGを用いてPostgreSQLに詳しいアシスタントAIを試作したので、気づいたところをいくつ か共有いたします。 まとめ PostgreSQLアシスタントAIはある程度使えるものになりそ
AWS News Blog Amazon Aurora MySQL zero-ETL integration with Amazon Redshift is now generally available “Data is at the center of every application, process, and business decision,” wrote Swami Sivasubramanian, VP of Database, Analytics, and Machine Learning at AWS, and I couldn’t agree more. A common pattern customers use today is to build data pipelines to move data from Amazon Aurora to Amazon R
CDK の中で DB を初期化する点についても後ほど触れます。 S3 にサンプルデータをアップロードする 続いて、以下のコマンドで S3 にサンプルのデータを入れます。 bucket_name=$(aws cloudformation describe-stacks --stack-name BlogAthenaJoinS3AndMysqlStack --output text --query 'Stacks[0].Outputs[?OutputKey==`BucketName`].OutputValue') aws s3 cp ./s3_test_data/data "s3://${bucket_name}/data" --recursive これで CloudFormation で作成した S3 バケット名を取得し、そのバケットに以下の CSV ファイルをアップロードしました。 ※4都
# APITo see the full list of supported methods, see SelectQueryopen in new window. db.NewSelect(). With("cte_name", subquery). Model(&strct). Model(&slice). Column("col1", "col2"). // quotes column names ColumnExpr("col1, col2"). // arbitrary unsafe expression ColumnExpr("count(*)"). ColumnExpr("count(?)", bun.Ident("id")). ColumnExpr("(?) AS alias", subquery). ExcludeColumn("col1"). // all column
はじめにTIG真野です。育休明けです。 PostgreSQLには timestamp with time zone(timestamptz: 長いので以後こちらで表記します)型が存在します。一見、タイムゾーン付きで日時データを保持してくれそうな名称ですが、そうではないよという話をさせてください。 timestampz の仕様PostgreSQLのドキュメント 8.5.1.3. タイムスタンプ には以下のような仕様が書かれています。 timestampzの内部に格納されている値は UTC である 入力文字列にタイムゾーンが指定されていれば、そのタイムゾーンを元にUTCに変換され保持される timestampzの値を取得すると、UTCから現行のタイムゾーンに変換されて表示される 1,2 は timestamp with time zone という名称から、書き込み時のタイムゾーンも保持している
Amazon Aurora MySQL-Compatible Edition now supports a new, enhanced binary log (binlog). The enhanced binlog reduces the compute performance overhead caused by enabling binlog, which, in certain cases, can reach up to 50%, down to 13%. The enhanced binlog also improves database recovery time by up to 99% after restarts and failovers, as compared to when native MySQL binlog is enabled. One of the m
This article brought to you by LWN subscribersSubscribers to LWN.net made this article — and everything that surrounds it — possible. If you appreciate our content, please buy a subscription and make the next set of articles possible. In the fast-moving open-source world, programs can come and go quickly; a tool that has many users today can easily be eclipsed by something better next week. Even i
Amazon Aurora MySQL zero-ETL integration with Amazon Redshift is now available in public preview. This feature enables near real-time analytics and machine learning (ML) on petabytes of transactional data stored in Amazon Aurora MySQL-Compatible Edition. Data written into Aurora is available in Amazon Redshift within seconds, so you can quickly act on it without having to build and maintain comple
Database schema migrations can be a double-edged sword. They are essential for keeping our systems up to date and in sync with evolving application requirements, but often come bundled with a set of challenges that can leave even the most seasoned developers and database administrators scratching their heads (or banging them on the keyboard). Breaking changes: One of the fundamental issues plaguin
The recent discussion about AIX support in PostgreSQL (as of now removed in PostgreSQL 17) led me to look through the project’s history, to learn what platforms we have supported when. In this context, “platform” really means operating system. One useful proxy is looking at the files in src/template/, because every supported platform needs to be listed there. There are other dimensions, such as wh
If you have enough experience with MySQL, it is very possible that you stumbled upon an unusually slow SELECT COUNT(*) FROM TABLE; query execution, at least occasionally. Recently, I had a chance to investigate some of these cases closer, and it stunned me what huge differences there can be depending on the circumstance given the very same table. As the problem turned out to be much more complex t
ずいぶんご無沙汰のブログ記事となりました。 今回は、設計を一新して速く、頑強になった PG-Strom v5.0 をご紹介します。 なぜ再設計が必要だったのか? 前バージョンの PG-Strom v3.x シリーズの基本的な設計は、2018年のPG-Strom v2.0の頃から大きく変わっていません。 当時の最新GPUモデルは Volta 世代(TESLA V100)で、CUDAのバージョンは9.2ですから、かなりの大昔という事はお分かり頂けると思います。 この頃、PG-Stromの開発において最優先すべき課題は、先ず実用となるバージョンをリリースする事でした。(※ HeteroDB社の創業は2017年7月です) クエリの処理速度を高速化する事は当然なのですが、それ以上に、まだPG-Stromの内部インフラも十分に枯れていない中で、クラッシュせずに走り切る事や、バグがあったとしても容易に原
PostgreSQL 16 introduces quite a few improvements to the query planner and makes many SQL queries run faster than they did on previous versions of PostgreSQL. If you look at the PG16 release notes, you’ll see some of these planner improvements. But with the volume of changes made in each PostgreSQL release, it’s not possible to provide enough detail about each and every change. So maybe you might
As a query optimization researcher, I’ve spent the last 10 years of my life playing with, learning from, and building on top of the most sophisticated open source query optimizer out there, PostgreSQL. I recently wondered how much PostgreSQL had improved over the decade since I started working on databases. While changelogs and opinion pieces were plentiful, I couldn’t find any strong empirical co
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く