Reputation
11,093
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 12 30
Newest
 innodb
Impact
~640k people reached

1d
comment Qcache_free_memory not full yet I get alot of Qcache_lowmem_prunes
@aland that is a very good point. No, I should have been using the default value of 4096. It looks as if the query cache trims the block down to the smallest possible power of two after filling it, leaving the free space at the end, so that 7/8ths of the entire 4096 bytes originally allocated aren't stranded. I'll have to dig more deeply into this.
May
19
comment Converting MySQL master-master replication to master-standby
And to be clear, the RESET SLAVE; would be done on the master to prevent it from receiving further updates from the slave.
May
19
comment Converting MySQL master-master replication to master-standby
... in fact, the master should not only be stopped, but also RESET SLAVE; to be safe... else you risk dropping and reloading tables on the master, while you are rebuilding the slave.
May
19
comment Delete and Recreate Indexes in MySQL to reduce table size for copying the db to a new server?
If mysqldump isn't working, then you are doing something wrong, and you should consider posting a new question, to figure out why, assuming there is not already an answer here that addresses the problem. It is the standard tool for this task, and is by far the safest approach.
May
9
comment Best configuration for MySQL? InnoDB and MyISAM
You should remove all of those settings except innodb_buffer_pool_size. Don't depart from the defaults unless you have a specific reason to, and verify the impact of each change, separately. Tweaking parameters like this can have unintended consequences and most "tuning" advice you will find is not helpful.
May
7
comment Intermittent “access denied” (1045) message from MySQL
SET GLOBAL LOG_WARNINGS = 2; and try again. Then check the MySQL error log.
May
6
comment Get data faster from databasse
That is not really a query. It would be better to get the actual SQL being generated by that construct... and then use EXPLAIN SELECT ... to review the server's query plan... but certainly WHERE column LIKE '%search_string%' is always going to be a slower query because indexes provide very little benefit. The % at the beginning prevents any index on the referenced column from being used, if there is one.
May
5
comment Inconsistencies with ADD CONSTRAINT index_name in MySQL
The answer implies that SET foreign_key_checks = 1; is a "flag" that can be set at the database level, and set "unknowingly," when it is actually scoped to the connection (session) level and is the default. I also don't see where the answer is derived from the documentation cited.
Apr
28
answered Does MySQL support querying for the current running transaction id
Apr
28
comment What are some known hazards with cyclical replication between two MySQL master servers?
Agreed. Failure is very likely, in such an environment. To put a fine point on it, this setup isn't guaranteed to work in either direction. "MySQL supports replication from one major version to the next higher major version.". Specifically, that means from and older master and to a newer slave, only. In circular replication, both servers have both roles, and a newer master with an older slave "may be possible, but is generally not supported". There are too many changes for backwards replication to be safe.
Apr
24
awarded  innodb
Apr
8
answered Vague replication error code 2005
Apr
2
comment MySQL FULLTEXT search not returning any results
I always assumed that the rows and key_len are both set to artificially low values as a naive (but effective) tactic to persuade the optimizer that choosing a plan involving the fulltext index would be a really, really, really good idea. Of course, what other option could there be? None, right? As the source file storage/innobase/handler/ha_innodb.cc points out right before setting the "1" in "rows," /* The whole concept has no validity for FTS indexes. */ The only time I recall seeing fultext not preferred was a unique (btree) index with zero matching rows.
Apr
1
reviewed Close Query data from two tables and substitute foreign keys of first table with values of second
Mar
29
comment SQL Query challenge
Notice now that one of the top two points is different, (5,1) replaces (4,3). :) Now, it appears you've actually asked for two different things... find the top line... and identify "whether new data steps above this line". Which of these two is the one you are looking to solve? Find the line for a set of data? Or given the two points on the already-known line, identify whether the data points in the table are above, below, or on it?
Mar
29
comment SQL Query challenge
Verify the accuracy of your illustration... it seems like if (2,8) and (4,3) are true then you have a rise/run of -2.5/1 so the line would intersect (5,0.5) so (5,1) is actually above the line, not below. Right?
Mar
29
comment I want to rewrite my MySQL query so that FIND_IN_SET doesn't do a full table scan unless necessary
ON table2.user_id-[some id] ... you're subtracting ids, here? Also, please post the query plans. I don't see a condition that should trigger a full scan, even with FIND_IN_SET() used, assuming user_id is the leftmost column in the primary key. If it isn't, then it needs its own index.
Mar
11
comment Prevent Reconnections During Application Cluster Restart
Excellent. I'll post an answer with an explanation of why I made that suggestion.
Mar
7
comment Concurrency when simulating autoincrement with triggers on MySQL
InnoDB doesn't require the columns referenced by a foreign key constraint to be the primary key -- only that they be in an index together, in the correct order, as the leftmost columns of the index in the parent table. This suggests you're going to a lot of unnecessary trouble, and you could just stick with ordinary auto-increment primary keys.
Mar
6
comment Problem moving database to new server
Right, but did you also verify that you are actually logging in as the user that you believe you're logging in as? Next step, the MySQL error log... particularly any errors or warnings on startup related to the system grant tables. Especially if you have copied this data from an older version of MySQL Server.