<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Database on Shaowen Chen's Website</title><link>https://www.chenshaowen.com/en/tags/database/</link><description>Recent content in Database on Shaowen Chen's Website</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>&amp;copy;2016 - {year}, All Rights Reserved.</copyright><lastBuildDate>Tue, 10 Feb 2026 00:00:00 +0000</lastBuildDate><sy:updatePeriod>weekly</sy:updatePeriod><atom:link href="https://www.chenshaowen.com/en/tags/database/atom.xml" rel="self" type="application/rss+xml"/><item><title>Containerized Deployment of a Multi-Node FoundationDB Cluster and Operations</title><link>https://www.chenshaowen.com/en/blog/container-deploy-multi-node-foundationdb-and-maintenance.html</link><pubDate>Tue, 10 Feb 2026 00:00:00 +0000</pubDate><atom:modified>Tue, 10 Feb 2026 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/container-deploy-multi-node-foundationdb-and-maintenance.html</guid><description>1. Generate a Cluster ID 1 cat /dev/urandom | tr -dc &amp;#39;a-zA-Z0-9&amp;#39; | fold -w 16 | head -n 1 The examples below use CLUSTER_ID=fKbIga9RHP79OIx1.
2. On the First Node Configure environment variables 1 2 3 4 5 6 7 8 9 10 export CONTAINER_CLI=nerdctl export IMAGE=foundationdb/foundationdb:7.1.26 export CLUSTER_ID=fKbIga9RHP79OIx1 export FDB_INSTANCE_NAME=fdb_server export FDB_CLUSTER_FIRST_IP=$(hostname -I | awk &amp;#39;{print $1}&amp;#39;) export FDB_PUBLIC_IP=$(hostname -I | awk &amp;#39;{print $1}&amp;#39;) export FDB_PORT=4500 export FDB_DIR=/data/ops/fdb/$FDB_INSTANCE_NAME Clean up old data 1 2 3 $CONTAINER_CLI rm -f $FDB_INSTANCE_NAME mv $FDB_DIR $FDB_DIR.</description><dc:creator>微信公众号</dc:creator><category>FoundationDB</category><category>Database</category><category>Middleware</category><category>Storage</category><category>Containers</category><category>3FS</category><category>Operations</category></item><item><title>FoundationDB Data Backup and Restore</title><link>https://www.chenshaowen.com/en/blog/foundationdb-data-backup-and-restore.html</link><pubDate>Tue, 10 Jun 2025 00:00:00 +0000</pubDate><atom:modified>Tue, 10 Jun 2025 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/foundationdb-data-backup-and-restore.html</guid><description>1. Set Environment Variables Set the foundationdb cluster name and version 1 2 3 4 5 export CLUSTER_NAME= export NAMESPACE= export DEPLOY_NAME=${CLUSTER_NAME}-deployment export SECRET_NAME=fdb-backup-secret export VERSION=7.1.26 Set the S3 backup bucket and credentials 1 2 3 4 5 export BUCKET= export HOST=s3.us-west-2.amazonaws.com export AK=x export SK=x export S3_BACKUP_URI=&amp;#34;blobstore://${AK}:${SK}@${HOST}/fdb-backup?bucket=${BUCKET}&amp;amp;sc=0&amp;#34; 2. Create the Credentials 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 cat &amp;lt;&amp;lt;EOF | kubectl apply -f - apiVersion: v1 kind: Secret metadata: name: ${SECRET_NAME} namespace: ${NAMESPACE} type: Opaque stringData: credentials: | { &amp;#34;accounts&amp;#34;: { &amp;#34;${BUCKET}@${HOST}&amp;#34;: { &amp;#34;access_key&amp;#34;: &amp;#34;${AK}&amp;#34;, &amp;#34;secret&amp;#34;: &amp;#34;${SK}&amp;#34;, &amp;#34;endpoint&amp;#34;: &amp;#34;${HOST}&amp;#34; } } } EOF 3.</description><dc:creator>微信公众号</dc:creator><category>Database</category><category>FoundationDB</category><category>Kubernetes</category><category>Backup</category><category>Operations</category></item><item><title>Django Performance: Database Query Optimization</title><link>https://www.chenshaowen.com/en/blog/database-query-optimization-of-django-performance.html</link><pubDate>Wed, 20 Mar 2019 00:00:00 +0000</pubDate><atom:modified>Wed, 20 Mar 2019 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/database-query-optimization-of-django-performance.html</guid><description>This article mainly offers optimization advice on Django fields and queries, and also introduces a performance analysis tool called Django-silk. I hope it helps you develop high-performance Django projects.
1. DBA&amp;rsquo;s Advice 1.1 Table Field Design Avoid null values; null values are hard to optimize queries around and take up extra index space Prefer INT over BIGINT, and describe fields as accurately as possible Use enums or integers instead of string types Use TIMESTAMP instead of DATETIME Do not put more than 20 fields in a single table Store IPs as integers 1.</description><dc:creator>微信公众号</dc:creator><category>Database</category><category>Optimization</category><category>Performance</category><category>Django</category><category>Python</category><category>R&amp;D</category></item><item><title>Django Performance: Sharding Databases and Tables</title><link>https://www.chenshaowen.com/en/blog/sub-db-and-table-of-django-performance.html</link><pubDate>Tue, 19 Mar 2019 00:00:00 +0000</pubDate><atom:modified>Tue, 19 Mar 2019 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/sub-db-and-table-of-django-performance.html</guid><description>1. The Problem We Hit The frontend requests are heavy, concurrency is high, and access is slow. The bottlenecks show up mainly as:
Large single tables Large single databases Slow network IO Slow disk IO Optimizing network and disk IO mainly relies on hardware upgrades. In theory, a database imposes no limit on the size of a single database or a single table, but an oversized single database or table means more requests land on a single machine, putting pressure on IO.</description><dc:creator>微信公众号</dc:creator><category>Django</category><category>Database</category><category>Sharding</category><category>Performance</category><category>Database Sharding</category><category>Table Sharding</category></item><item><title>Django Model and E-R Diagram</title><link>https://www.chenshaowen.com/en/blog/django-model-and-er-diagram.html</link><pubDate>Fri, 02 Mar 2018 00:00:00 +0000</pubDate><atom:modified>Fri, 02 Mar 2018 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/django-model-and-er-diagram.html</guid><description>As requirements are gradually confirmed, the system&amp;rsquo;s DB model is gradually confirmed as well. Sometimes you use a tool like MySQL Workbench to draw an E-R diagram and then generate MySQL database tables, and at that point you need to reverse-generate Django Models; other times you write the Django Models directly, but then you need to look at the E-R diagram.</description><dc:creator>微信公众号</dc:creator><category>Django</category><category>Python</category><category>Database</category><category>Design</category><category>Model</category><category>R&amp;D</category></item></channel></rss>