Re: Up to 50K inserts per second... smokin'!
Jerry Stuckle <[email protected]> Thu, 26 Aug 2021 10:53:24 -0400
| Newsgroups | comp.databases.mysql |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On 8/26/2021 3:39 AM, Axel Schwenke wrote: > On 26.08.2021 01:26, Jerry Stuckle wrote: > >> Very understandable. Each INSERT must be parsed and executed by the RDBMS. >> Parsing a text SQL statement and determining how to execute it is very time >> consuming, much more than actually doing the SQL statement. >> >> That's why enterprise-level databases like IBM's DB2 have a means to >> preprocess static SQL statements and build access plans to do the work. The >> resultant code doesn't actually submit the SQL statement but instead calls a >> function which executes the pre-built access plan. > > That's a typical Stuckle post. MySQL introduced prepared statements in > version 4.1. That was somewhere around 2005. Whopping 16 years in the past. > Yet still he tries to sell it as a feature specific to enterprise RDBMS... > MySQL's version of prepared statements is not at all like static SQL in enterprise level databases. But you don't know the difference. A short course. In DB2 the program is run through a preprocessor once. The preprocessor looks for EXEC DB2 statements. When it finds one, it analyzes te statement, builds an access plan and stores it in the database. It then comments out the EXEC DB2 statement and builds native language calls directly to the stored access plan to pass values and execute the plan. The SQL code is commented out and doesn't even appear in the compiled program. This is NOT the same as prepared statements, which still must be prepared every time the program hits the PREPARE statement. It is much faster. But you have no idea what a high performance databsae is. Compared to DB2, MySQL is a toy -- ================== Remove the "x" from my email address Jerry Stuckle [email protected] ==================