… to see how fast the SQL procedure code is at doing …stored function. mysql> delimiter // mysql> create function speaks_english(c char(3)) returns integer deterministic > begin > declare res int; > select count(distinct co.Code) into res from Country as…
Post: Flexviews - part 3 - improving query performance using materialized views
…stored procedure API, called the SQL_API which is used to define the view. These stored procedures…COUNT(*). mysql> select count(*) cnt from order_lines\G *************************** 1. row *************************** cnt: 155187034 1 row in set (32.03 sec) mysql> select…
Post: SQL Injection Questions Followup
…$placeholders = join(“,”, array_fill(0, count($params), “?”)); $sql = “SELECT * FROM Bugs WHERE bug_id IN ($…how? Any interpolation of unsafe content into an SQL string is potentially an…Stored Procedures you have other issues
I consulted for a customer who uses dynamic SQL in stored procedures…
Post: Analyzing air traffic performance with InfoBright and MonetDB
… “Div*” are not really used. Load procedure: Infobright: the loader that comes with… query for any database benchmarker is SELECT count(*) FROM ontime;. Both InforBritgh and MonetDB…into account amount of rows engine had to crunch. For query Q8 (1year range) traditional transactional oriented stored…
Post: How fast can MySQL Process Data
… stored procedure to make timing easier: mysql> DELIMITER // mysql> CREATE PROCEDURE test_read(pl INT) -> BEGIN -> DECLARE t INT; -> SET @x = 0; -> REPEAT SET @x = @x + 1; -> SELECT COUNT(*) FROM m1 WHERE i>0 INTO t; -> UNTIL @x > pl -> END REPEAT…
Post: Debugging problems with row based replication
…offer advantages particularly if triggers or stored procedures are used, or if non deterministic… … SELECT a few times to get some dummy data: insert into repl.t1 select NULL…of data to play with: select count(*) from t1; +———-+ | count(*) | +———-+ | 65536 | +———-+ 1 row in set …
Comment: Thanks Giving Challenge: How to detect replication context
…. If different – we are on the slave. The following stored procedure writes ‘master’ or ‘slave’ in the `replication_status` table. …SELECT SUBSTRING_INDEX(UUID(),’-',-1) FROM DUAL; INSERT INTO uuid_test VALUES(SUBSTRING_INDEX(@current_uuid,’-',-1)) ; INSERT INTO replication_status SELECT CASE COUNT…
Post: How FLUSH TABLES WITH READ LOCK works with Innodb Tables
… | root | localhost | dumptest | Query | 324 | Sending data | select count(*) from A,B | 0 | 0 | 2359297 | | …| Query | 74 | Waiting for global read lock | insert into C values (“a”,1) | 0 | 0 | 1 | | …re not actively changing users, stored procedures etc (which are stored in MyISAM tables anyway)…
Post: Troubleshooting MySQL Memory Usage
… with addition of user variables, stored procedures, prepared statements etc which can be…Drizzle team to take a look into solving this problem. You will… to look at Prepared_stmt_count to see how many prepared…both in memory and not): mysql> select * from information_schema.global_temporary_tables \G …

