Tagged articles
44 articles
Page 1 of 1
dbaplus Community
dbaplus Community
Jan 3, 2026 · Databases

When MySQL Auto‑Increment Hits INT Limit: Diagnosis and Fixes

The article recounts a MySQL production incident where an INT auto‑increment column reached its maximum value, causing insert failures, and walks through analysis, three remediation options, a stored‑procedure cleanup, a conversion to BIGINT, performance monitoring, and lessons on concurrency and schema design.

BIGINTDatabase PerformanceINT overflow
0 likes · 9 min read
When MySQL Auto‑Increment Hits INT Limit: Diagnosis and Fixes
macrozheng
macrozheng
Aug 11, 2025 · Databases

Why MySQL Auto‑Increment IDs Hit Their Limit and How to Fix It

This article recounts a real‑world MySQL incident where the auto‑increment INT overflowed after billions of rows, explores why the ID limit was reached, evaluates three remediation strategies—including switching to BIGINT, distributed IDs, and sharding—and shares practical SQL scripts and performance insights.

BIGINTStored Procedureauto_increment
0 likes · 9 min read
Why MySQL Auto‑Increment IDs Hit Their Limit and How to Fix It
IT Xianyu
IT Xianyu
Jun 22, 2025 · Databases

Master Looping and Variables in MySQL & PostgreSQL Stored Procedures

This tutorial demonstrates how to use variables and loop constructs in MySQL and PostgreSQL stored procedures to iterate over a users table, filter records by age, and simulate sending a system welcome message, while comparing syntax differences between the two databases.

/loopPostgreSQLSQL
0 likes · 6 min read
Master Looping and Variables in MySQL & PostgreSQL Stored Procedures
IT Xianyu
IT Xianyu
Jun 19, 2025 · Databases

Master MySQL Stored Procedure Parameters: IN, OUT, INOUT Explained with Real Examples

This tutorial explains why stored procedure parameters are essential, details the differences between IN, OUT, and INOUT parameters, and provides step‑by‑step MySQL examples—including environment setup, code snippets, execution results, common FAQs, and an advanced age‑checking exercise—to help developers write flexible, reusable procedures.

IN OUT INOUTSQLStored Procedure
0 likes · 10 min read
Master MySQL Stored Procedure Parameters: IN, OUT, INOUT Explained with Real Examples
IT Xianyu
IT Xianyu
May 14, 2025 · Databases

Using PostgreSQL Stored Procedures to Batch Update User Tags Efficiently

This article explains how Java developers can replace thousands of individual UPDATE statements with a single PostgreSQL stored procedure call, covering the motivation, procedure creation, Java invocation, scheduling with shell scripts, performance benchmarks, and common pitfalls.

Batch UpdateJavaPostgreSQL
0 likes · 8 min read
Using PostgreSQL Stored Procedures to Batch Update User Tags Efficiently
Huolala Safety Emergency Response Center
Huolala Safety Emergency Response Center
Mar 18, 2025 · Information Security

Uncovering MSSQL Attack Chains: Stored Procedures, COM, CLR, Triggers, and Lateral Movement

This article provides a comprehensive technical analysis of MSSQL attack vectors—including vulnerable stored procedures, COM automation, CLR exploitation, sandbox bypass, trigger abuse, proxy jobs, Kerberoasting, and linked servers—detailing prerequisites, step‑by‑step T‑SQL examples, mitigation recommendations, and overall impact on database security.

Attack ChainCLRCOM Automation
0 likes · 19 min read
Uncovering MSSQL Attack Chains: Stored Procedures, COM, CLR, Triggers, and Lateral Movement
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 19, 2024 · Databases

Diagnosing Slow Stored Procedure Execution in OceanBase: Trace ID Analysis and Plan Cache Issues

This article explains how to troubleshoot a slow OceanBase stored procedure by locating its trace_id, analyzing audit logs to identify non‑cached UPDATE statements, revealing that preceding TRUNCATE operations invalidate the plan cache, and finally recommending replacing TRUNCATE with DELETE to restore performance.

OceanBasePlan CacheSQL Optimization
0 likes · 10 min read
Diagnosing Slow Stored Procedure Execution in OceanBase: Trace ID Analysis and Plan Cache Issues
Architecture Digest
Architecture Digest
Mar 6, 2024 · Databases

Implementing SaaS Multi‑Tenant Architecture with Shared Database Table Partitioning in MySQL

This article explains how to design a SaaS system that isolates each subsidiary's data by adding a tenant_id column to a shared MySQL table, converting the table to LIST‑partitioned storage, and enforcing tenant‑level access through stored procedures and a MyBatis interceptor, complete with code examples and testing steps.

MyBatisSaaSStored Procedure
0 likes · 18 min read
Implementing SaaS Multi‑Tenant Architecture with Shared Database Table Partitioning in MySQL
MaGe Linux Operations
MaGe Linux Operations
Jan 12, 2024 · Databases

Master MySQL Flow Control: IF, CASE, LOOP, WHILE, REPEAT & LEAVE Explained

This guide explains MySQL stored procedure flow‑control constructs—including IF, CASE, LOOP, WHILE, REPEAT, LEAVE and ITERATE—detailing their syntax, usage patterns, and practical examples such as salary adjustments and conditional logic, helping developers implement complex database operations efficiently.

Flow ControlSQLStored Procedure
0 likes · 19 min read
Master MySQL Flow Control: IF, CASE, LOOP, WHILE, REPEAT & LEAVE Explained
Top Architect
Top Architect
Jan 11, 2024 · Databases

Implementing Multi‑Tenant SaaS Architecture with MySQL Partitioning and MyBatis Interceptor

This article demonstrates how to convert a single‑tenant MySQL application into a multi‑tenant SaaS solution by adding a tenant_id column, using shared‑database partitioning, creating tenant tables, writing stored procedures for dynamic partition management, and implementing a MyBatis interceptor for hierarchical data permissions.

MyBatisSaaSStored Procedure
0 likes · 19 min read
Implementing Multi‑Tenant SaaS Architecture with MySQL Partitioning and MyBatis Interceptor
Architect
Architect
Jan 9, 2024 · Databases

How to Build a Multi‑Tenant SaaS Architecture with MySQL Partitioning and MyBatis Interceptor

This article walks through converting a single‑tenant MySQL application into a SaaS solution by adding a tenant_id column, using shared‑database table partitioning, creating tenant metadata tables, writing stored procedures to add columns and partitions, and implementing a MyBatis interceptor for automatic data‑permission enforcement.

Data PermissionMyBatisSaaS
0 likes · 22 min read
How to Build a Multi‑Tenant SaaS Architecture with MySQL Partitioning and MyBatis Interceptor
MaGe Linux Operations
MaGe Linux Operations
Jan 4, 2024 · Databases

Master MySQL Stored Procedures: Concepts, Syntax, and Real-World Examples

This guide explains MySQL stored procedures, covering their definition, benefits, parameter types, creation syntax, delimiter handling, multiple practical examples, calling conventions, debugging tips, and hands‑on exercises, enabling developers to efficiently write, test, and manage reusable SQL routines.

Code ExamplesSQLStored Procedure
0 likes · 17 min read
Master MySQL Stored Procedures: Concepts, Syntax, and Real-World Examples
Architect's Guide
Architect's Guide
Oct 21, 2023 · Databases

Implementing Monthly Horizontal Partitioning in MySQL Using Stored Procedures and Dynamic Table Creation

This article details a practical approach to handling massive billing data by dynamically creating monthly tables in MySQL via stored procedures, integrating them with a SpringBoot‑MyBatis backend, and providing APIs for insertion, serial‑number lookup, and time‑range queries, complete with code examples and operational tips.

Dynamic TableSpringBootStored Procedure
0 likes · 31 min read
Implementing Monthly Horizontal Partitioning in MySQL Using Stored Procedures and Dynamic Table Creation
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 18, 2023 · Databases

Diagnosing and Resolving USER_TAB_COLUMNS View Inconsistencies Between Oracle and OceanBase

This article investigates why Oracle and OceanBase return different results when querying the USER_TAB_COLUMNS view in stored procedures, demonstrates reproducible tests, analyzes system view behavior, and proposes workarounds such as using ALL_TAB_COLUMNS, creating synonyms, intermediate tables, or materialized views to ensure consistent table name retrieval.

Database ViewsOceanBaseOracle
0 likes · 19 min read
Diagnosing and Resolving USER_TAB_COLUMNS View Inconsistencies Between Oracle and OceanBase
Selected Java Interview Questions
Selected Java Interview Questions
Sep 26, 2023 · Databases

Practical Guide to Monthly Horizontal Partitioning in MySQL Using Stored Procedures and SpringBoot

This article presents a hands‑on walkthrough of implementing in‑database horizontal partitioning by month for a high‑volume billing table, covering the business background, design decisions, stored‑procedure table creation, dynamic table selection in MyBatis, and query strategies such as serial‑number lookup and date‑range retrieval.

SpringBootStored ProcedureTable Partitioning
0 likes · 31 min read
Practical Guide to Monthly Horizontal Partitioning in MySQL Using Stored Procedures and SpringBoot
Liangxu Linux
Liangxu Linux
Jul 19, 2022 · Databases

Master MySQL Stored Procedures, Events, and Triggers for Automated Data Workflows

This guide explains how to use MySQL stored procedures, events (timers), and triggers—including their creation, variable handling, control structures, parameter passing, loops, scheduling options, and practical examples—to automate reporting, data monitoring, and business logic directly at the database layer.

Event SchedulerSQLStored Procedure
0 likes · 11 min read
Master MySQL Stored Procedures, Events, and Triggers for Automated Data Workflows
Architect
Architect
Mar 2, 2021 · Databases

SQL Query Optimization for Large-Scale MES Reporting Using Stored Procedures

An in-depth case study describes how to dramatically improve the performance of a massive MES reporting query—reducing execution from over half an hour to seconds—by analyzing inefficient SQL, adding proper indexes, avoiding full table scans, redesigning with stored procedures, temporary tables, and selective use of NOLOCK.

MESPerformance OptimizationSQL
0 likes · 22 min read
SQL Query Optimization for Large-Scale MES Reporting Using Stored Procedures
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 30, 2020 · Databases

Traversing JSON Array Ranges in MySQL 8.0

This article explains how MySQL 8.0’s JSON data type enables range‑based traversal of JSON arrays, demonstrates extracting array elements with path expressions, and provides stored‑procedure examples—both a traditional loop version and an optimized version using the new "$[m to n]" syntax.

Array TraversalJSONJSON Functions
0 likes · 7 min read
Traversing JSON Array Ranges in MySQL 8.0
Java Architect Essentials
Java Architect Essentials
Sep 17, 2020 · Databases

Optimizing Large-Scale SQL Queries with Stored Procedures and Indexing

The article details how a half‑hour SSRS report query on a massive MES database was transformed into a sub‑second operation by analyzing the original SQL, eliminating full table scans, adding proper indexes, using temporary tables and a well‑designed stored procedure, while also discussing common pitfalls and best‑practice tips for high‑performance database querying.

Database OptimizationSQLStored Procedure
0 likes · 20 min read
Optimizing Large-Scale SQL Queries with Stored Procedures and Indexing
Top Architect
Top Architect
Aug 29, 2020 · Databases

SQL Query Optimization and Stored Procedure Refactoring for Large‑Scale MES Reporting

The article describes how a massive MES reporting query that took over half an hour to run was analyzed, re‑engineered with proper indexing, partitioning considerations, and a comprehensive stored‑procedure redesign, resulting in sub‑second response times for both backend analysis and front‑end B/S applications.

Stored Proceduredatabase-optimization
0 likes · 22 min read
SQL Query Optimization and Stored Procedure Refactoring for Large‑Scale MES Reporting
Java Backend Technology
Java Backend Technology
Aug 11, 2020 · Databases

How I Turned a Half‑Hour SSRS Report into a Sub‑Second Query with a Stored Procedure

The author describes how they transformed a sluggish SSRS report that took over thirty minutes to run into a fast, sub‑second query by analyzing the original SQL, adding missing indexes, avoiding full table scans, and rewriting the logic as a flexible stored procedure, complete with code examples and performance tips.

MESSQL OptimizationSSRS
0 likes · 24 min read
How I Turned a Half‑Hour SSRS Report into a Sub‑Second Query with a Stored Procedure
Java Captain
Java Captain
Jun 23, 2020 · Databases

SQL Basics: Concepts, Syntax, and Common Commands

This article provides a concise overview of relational database fundamentals, covering key terminology, the structure of SQL statements, essential DDL/DML/TCL/DCL commands, query operators, joins, subqueries, functions, indexing, constraints, transactions, permissions, stored procedures, cursors, and triggers, with practical code examples throughout.

DDLDMLSQL
0 likes · 30 min read
SQL Basics: Concepts, Syntax, and Common Commands
ITPUB
ITPUB
Dec 4, 2019 · Databases

Essential SQL Server Commands: From Basic CRUD to Advanced Replication and Automation

This comprehensive guide covers fundamental SQL Server operations such as creating databases, tables, indexes, and views, advanced techniques like set operators, subqueries, and linked servers, plus step‑by‑step instructions for replication, backup, compression, and automated synchronization using stored procedures and SQL Agent jobs.

Linked ServerReplicationSQL
0 likes · 27 min read
Essential SQL Server Commands: From Basic CRUD to Advanced Replication and Automation
ITPUB
ITPUB
May 19, 2019 · Information Security

Uncovering a SQL Server Job That Hid a Persistent Malware Loader

This article details a multi‑stage, file‑less attack that leveraged weak SQL Server credentials, Transact‑SQL stored procedures, and WMI to download and execute a downloader (cabs.exe) which fetched multiple botnet components, and explains the forensic steps and remediation measures taken to eradicate the threat.

SQL ServerStored ProcedureWMI
0 likes · 7 min read
Uncovering a SQL Server Job That Hid a Persistent Malware Loader
Java Captain
Java Captain
Dec 12, 2018 · Backend Development

Integrating Redis with Java for a Seckill Application and Optimizing with MySQL Stored Procedures

This guide walks through downloading and installing Redis, adding Java dependencies, creating a Redis DAO with Protostuff serialization, configuring Spring beans, caching seckill data, implementing a MySQL stored procedure for atomic execution, mapping it with MyBatis, updating service and controller layers, and testing the entire workflow.

JavaPerformance OptimizationSeckill
0 likes · 8 min read
Integrating Redis with Java for a Seckill Application and Optimizing with MySQL Stored Procedures
dbaplus Community
dbaplus Community
Apr 9, 2017 · Databases

Recovering MySQL Replication After a Massive Binlog Overflow

This article explains why a large‑transaction update caused a binlog overflow and slave I/O failure in a remote MySQL master‑slave setup, and provides step‑by‑step commands and a stored‑procedure solution to restore replication safely.

GTIDReplicationStored Procedure
0 likes · 7 min read
Recovering MySQL Replication After a Massive Binlog Overflow
ITPUB
ITPUB
Oct 6, 2016 · Databases

How Adding Indexes Cut a 30‑Second MySQL View Query to 2 Seconds

A .NET MVC warehouse system’s MySQL view was taking over 30 seconds to fetch 70,000 inventory records, but by adding a composite index on the dictionary table, removing a UNION ALL, and adjusting view algorithms, the query time dropped to a few seconds, with a stored‑procedure alternative for flexible use.

Entity FrameworkStored ProcedureView Optimization
0 likes · 10 min read
How Adding Indexes Cut a 30‑Second MySQL View Query to 2 Seconds
ITPUB
ITPUB
Jun 2, 2016 · Databases

How to Efficiently Delete Massive Data Sets with a PL/SQL Procedure

This article explains a practical PL/SQL stored‑procedure technique for bulk‑deleting large tables by batching rows, using rowid partitioning, off‑peak execution, and short pauses to minimize impact on Oracle database performance.

OraclePL/SQLStored Procedure
0 likes · 3 min read
How to Efficiently Delete Massive Data Sets with a PL/SQL Procedure
ITPUB
ITPUB
May 27, 2016 · Databases

How to Log Every Executed Oracle SQL Statement with v$sql and Automated Jobs

This guide explains why a numeric column turned null, compares using the volatile v$sql view with a permanent logging solution, and details step‑by‑step how to create a tablespace, logging table, stored procedure, and scheduled job to capture all Oracle SQL statements.

Database LoggingJob SchedulingOracle
0 likes · 5 min read
How to Log Every Executed Oracle SQL Statement with v$sql and Automated Jobs
21CTO
21CTO
Apr 11, 2016 · Databases

How to Import JSON, XML, CSV, and Text Files into MySQL Efficiently

This article explains practical methods for importing various external data formats—such as CSV, plain text, XML, and JSON—into MySQL, covering command-line utilities, LOAD DATA statements, stored procedures, third‑party tools like mysqljsonimport, and using MySQL Workbench, while addressing configuration and security considerations.

CSVJSONLOAD DATA
0 likes · 11 min read
How to Import JSON, XML, CSV, and Text Files into MySQL Efficiently