I hate looking for this…. This will give you a rough idea of your innodb memory usage. I know it’s in a hundred spots, but i hate looking for it when i double check things. innodb_buffer_pool_size + key_buffer_size + max_connections*(sort_buffer_size+read_buffer_size+binlog_cache_size +2MB)
- I have never, ever seen this before. I don’t even know how the table was created with a different collation. However, I had all my other tables created with the character set utf8, no collation specified. I had to convert the second table to match the character set. This probably wouldn’t have been a problem if I wasn’t joining on a character field. alter table exclusion CONVERT TO CHARACTER SET utf8;
- I haven’t been using vim for very long, but I’ve gotten over the initial learning curve of getting used to the different editing modes. With some help from the guys in #vim on irc.freenode.net, I managed to get this gem: ` map :call SwitchDB() :function SwitchDB() : let g:current_db = input(“Database > “) :endfunction map :call Doquery() :function Doquery() : if !exists(“g:current_db”) : call SwitchDB() : endif : let query_string = input(g:current_db .
- Altering a big table sucks, and to make it worse you have no idea what’s happening or how long it will take. I’d like a progress bar, or some status output, or something that gives me the feeling like my server didn’t die.
- I was poking around the MySQL Worklog again over the weekend, and found a request for materialized views for MySQL. This feature has existed in Oracle for a while, in DB2 as a materialized query table, and appeared in MS SQL Server 2000 and 2005 as indexed views. What is a materialized view? A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views.
- I was cruising the MySQL Forge Worklog when I came across the idea of Time Delayed Replication. I had never considered the benefits of deliberately keeping a slave server behind a master. Kristian Koehntopp gives a good example: Kristian Koehntopp writes: TDS: Time delayed SQL_THREAD (Have a replication slave that is always lagging 30 minutes behind). Currently, replication is a rolling recovery: To set up replication you restore from a full dump with a binlog position.
- I’m not sure how I didn’t see this earlier, but it looks like MySQL 5.1 is coming with a load balancer for replicated servers. I’m absolutely pumped about this - we’ve got a few sites running with multiple db slaves and it’s so annoying having to check if they’re behind the master. It looks like the load balancer will automatically pull slaves out if they fall behind, and route connections to the ones that are the most up to date.
- While I’ve known how floating points are stored, I didn’t know if decimal was stored any differently, or if it was more or less accurate. According to a post on the MySQL list: Bruno Rodrigues Silva wrote: Dear all. The MySQL Manual inform that Decimal Data Type is used for represent exact-number, but like Float Point Data Type, Decimal use rounding case the fractional part is not sufficient. Therefore, what the difference?
- c++ mysql xcode I need to compile something and use the MySQL C++ library. I have mysql and mysql++ already compiled, I won’t go over how to do that now. I added the following code to the top of my source: #include <mysql++.h> I got an error /Users/jhaddad/dev/search_engine/main.cpp:4:21: error: mysql++.h: No such file or directory Not cool. How to fix: In XCode, open up the project settings (under the project menu).
- I’m setting up my first mysql cluster, and just wanted some clarification on a few things. In the manual, it says: Online schema changes. It is not possible to make online schema changes such as those accomplished using ALTER TABLE or CREATE INDEX, as the NDB Cluster engine does not support autodiscovery of such changes. (However, you can import or create a table that uses a different storage engine, and then convert it to NDB using ALTER TABLE tbl_name ENGINE=NDBCLUSTER.