ããã«ã¡ã¯ããµã¼ãã¹éçºé¨ã®èå¼ (@a_bicky) ã§ãã çªç¶ã§ãããRDBMS ã®æ¢åã®ãã¼ãã«ãè¦ã¦ã¿ãããä½ã§ãããªã«ã¤ã³ããã¯ã¹ã ãããªã®ï¼ãã¿ãããªçµé¨ã¯ããã¾ãããï¼ä¸è¦ãªã¤ã³ããã¯ã¹ã¯å®¹éãå§è¿«ããããæ¿å ¥ãé ããªã£ããã¨è¯ããã¨ãããã¾ããã ãããªããã§ãä»åã¯ã¬ã³ã¼ããæ¤ç´¢ããããã«å¿ è¦ãªã¤ã³ããã¯ã¹ã®åºç¤ç¥èã¨ãããè¦ãããä¸é©åãªã¤ã³ããã¯ã¹ã«ã¤ãã¦è§£èª¬ãã¾ããã¯ãã¯ãããã§ã¯ Rails ã®ãã¼ã¿ãã¼ã¹ã¨ãã¦ä¸»ã« MySQL 5.6ãMySQL ã®ã¹ãã¬ã¼ã¸ã¨ã³ã¸ã³ã¨ãã¦ä¸»ã« InnoDB ã使ã£ã¦ããã®ã§ãMySQL 5.6 ã® InnoDB ã«ã¤ãã¦è§£èª¬ãã¾ãã InnoDB ã®ã¤ã³ããã¯ã¹ã«é¢ããåºç¤ç¥è ã¤ã³ããã¯ã¹ã®æ§é (B+ æ¨) InnoDB ã§ã¯ B+ æ¨ã使ããã¦ãã¾ããB+ æ¨ã¯æ¬¡ã®ãããªç¹å¾´ãæã£ãæ¨æ§é ã§ãã 次æ°ã b ã¨ããã¨ã
select ... for update; select ... lock in share mode; ã®éããããããããªãã£ãã ãã¼ã¿ãæ´æ°ããæã«å¿ è¦ãªããã¯ã¯ãfor update ãã¼ã¿ãåç §ããæã«å¿ è¦ãªããã¯ã¯ãshare mode ã¨ä½æçã«ç解ã§ããã®ã ããã©ã¡ãã®ããã¯ãåã£ãã¨ãããä»ã®èª°ããã¼ã¿ãæ´æ°ãåé¤ã§ããªãã ã¾ããã©ã¡ãã®ããã¯ãã(for update ãã¦ããããä»ããåç §ã§ããªãã®ãã¨æããã)ä»ã®èª°ãããåç §ã¯å¯è½ã ãï¼ã¨ãªãã¨ããã®ï¼ã¤ã®ããã¯ãä½ãã©ãéãã®ï¼ï¼ ãã®çã㯠ãã ã«æ¸ãã¦ãã£ãã(ãªã³ã¯å ã¯Postgresã ããMySQLã§ãåããã¨) å ±æããã¯ã¨ã¯ãæä»ããã¯ï¼æ´æ°ãåé¤ãFOR UPDATEï¼ããããã¯ããï¼ãããä¸æ¹ãå ±æããã¯å士ã§ã¯äºãã«ãããã¯ããªãã¨ãããã®ã§ãã ãªãã»ã©ãshare mode ã¯ã»ã
This blog compares how PostgreSQL and MySQL handle millions of queries per second. Anastasia:Â Can open source databases cope with millions of queries per second? Many open source advocates would answer âyes.â However, assertions arenât enough for well-grounded proof. Thatâs why in this blog post, we share the benchmark testing results from Alexander Korotkov (CEO of Development, Postgres Professio
å¿ããã®ã§ã¡ã¢ my.cnfãèªã¿è¾¼ã¾ããå ´æã調ã¹ã $ mysql --help | grep my.cnf /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnfèªã¿è¾¼ã¾ãããé çªã¯å·¦ãã ããã¾ãç°å¢ãæ±ãã®ã¯å¥½ããããªãã®ã§ /usr/local/etc/my.cnf ã«ç½®ãã¾ã Homebrewã§å ¥ããMySQLã®my-xxx.cnfã®å ´æ $ find /usr/local/Cellar/mysql -name "my*.cnf" /usr/local/Cellar/mysql/5.5.27/mysql-test/suite/federated/my.cnf /usr/local/Cellar/mysql/5.5.27/mysql-test/suite/rpl/my.cnf /usr/local/Cellar
31. ã¬ããªã±ã¼ã·ã§ã³ã¹ã¬ã¼ãã«æ³¨æ (FIXED by 5.7.9) REPLICATION SLAVE権éã® *ä»ã«* SELECT ON performance̲schema.* ãå¿ è¦ mysql> show slave statusG *************************** 1. row *************************** .. Last_IO_Errno: 1142 Last_IO_Error: The slave I/O thread stops becaus e a fatal error is encountered when it try to get the value of SE RVER_ID variable from master. Error: SELECT command denied to use r 'replic
phpMyAdmin 㯠PHP ã§å®è£ ããã MySQL ã®ç®¡çãã¼ã«ã§ãã MySQL ã®ãã¼ã¿ãã¼ã¹ããã¼ãã«ã®ä½æãè¡ã£ããããã¼ã¿ã®è¿½å ãåç §ãªã©ããã©ã¦ã¶ããè¡ããã¨ãã§ãã¾ããããã§ã¯ phpMyAdmin ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã¨ä½¿ãæ¹ã解説ãã¾ãã ⻠使ç¨ãã¦ããç°å¢ã¯ PHP 8.08, MySQL 8.025, Apache 2.4.48 ã§ãã
I was playing about with Capistrano over the weekend. I wanted to automate the deployment of a Rails application to my server. The server was (I thought) just about ready to accept the app but I did not want to go through another manual deployment. I thought I would take the opportunity to script the deployment. The first task I set myself was to create a production MySQL database. Searching for h
ãã®è¨äºã¯ MySQL Casual Advent Calendar 2013 ã®25æ¥ç®ã®è¨äºã§ãã èªåã®éå»ã®ããã°ãå«ãã¦ãmysqlã³ãã³ãã®ã«ã¹ã¿ãã¤ãºã«ã¤ãã¦ãããããªæ å ±ãããã¾ããããããããªã¹ã¹ã¡ã®ç§ä¼ã®ã¿ã¬ãã¾ã¨ãããã¨æãã¾ããæ¯éããåèã«ã å®åæ(SQL)ã®ã·ã§ã¼ãã«ããå ¥å ãshow create table TABLENAME\Gãã¨ããselect user,host,password from mysql.user order by user,host;ãã¨ããããå®è¡ãããã©é·ãã¦å ¥åããã®ãããã©ããªã®ãããã¾ãããããããã·ã§ã¼ãã«ããã§å ¥åã§ããããã«ããæ¹æ³ã§ãã mysqlã³ãã³ãã§è¡ç·¨éãã§ããã®ã¯ãreadlineãlibeditããªã³ã¯ãã¦ãããããã§ãã å¾æ¥ã®å ¬å¼ãã¤ããªé å¸ç©ã«å«ã¾ããmysqlã³ãã³ãã¯readlineã§ãã
æè¿ãSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ã®ãã¿ãçãä¸ãã£ã¦ãããã ãä¸è¨ã®Togetterã¾ã¨ãããããéæºå°ã ãããã ãããªãã¢ã¼ãã¯ã¨ãªãåºæ¬ã ãã©ãåçã« SQL ãçµã¿ç«ã¦ãå ´åããããããããããå ´åã«åãã¦ã¨ã¹ã±ã¼ããç¥ã£ã¦ãããã»ããããããã - Togetterã¾ã¨ã ã¾ã¨ããèªãã ææ³ã¨ãã¦ã¯ããã©ã¡ãã®æè¦ãééã£ã¦ã¯ããªããã¨ãããã®ã ãåæãããã¯è¦æ¹ãç°ãªãããã«ãè¦è§£ã®ç¸éãçãã¦ããã ãã®ããã«æããSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ã«ã¤ãã¦ã¯ç§ãè¥å¹²æãã¨ãããããã®ã§æè¦ãæ¸ãã¦ãããã¨æãã æ»æãé²ãã®ã¯é£ããSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ãã¯ããã¨ããã»ãã¥ãªãã£å¯¾çãé£ããã®ã¯ãã²ã¨ã¤ã§ãç©´ãããã¨è´å½çãªãã¡ã¼ã¸ãåãå¾ãã¨ãããã¨ã ããã©ããã£ã¦å¹çããã³ã¼ããæ¸ãããã¨ããã³ã¼ãã®ã¡ã³ããã³ã¹æ§ãé«ããã«ã¯ã©ãæ¸ãã¹ãããã¿ãããªè°è«ã¨ã¯å ¨ã質ãç°ãªãè°è«ãå¿ è¦ã«ãªã£
ãã®è¨äºã¯MySQL Casual Advent Calendar 2013 3æ¥ç®ã®è¨äºã§ãã ã¯ãã㫠以åã«SELECT ... FOR UPDATEã¨ããã¯ã®æå - walf443's blogã®è¨äºã«Twitterã§å°ãè¨åãããã§ãããããã®è£è¶³ã¨ããããInnoDBã®ããã¯ã®ç¯å²ã«ã¤ãã¦åã¯ããç解ãã¦ãã¾ããã¨ãã話ã§ãã MySQLã¨ããã°ãInnoDBããããã¯ã¼ã¯ãµã¼ãã¨ãã¦ä½¿ãããã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãããSQLã¯InnoDBã®ã¤ã³ããã¯ã¹ã«ã¢ã¯ã»ã¹ããããã®DSLã¨ãã£ã¦ãéè¨ã§ã¯ãªãã§ãããã InnoDBã®ããã¯ã¨ã¯ã¤ã¾ãã¨ããã¤ã³ããã¯ã¹è¡ã®ããã¯ãªã®ã§ãInnoDBã®ããã¯ã®ç¯å²ãç解ããããã«InnoDBã®ã¤ã³ããã¯ã¹ã«ã¤ãã¦å°ãåç½®ããã¦ããã¾ã(ã ãã¶ç«¯æã£ããã©é·ããªã£ãâ¦)ã ã¯ã©ã¹ã¿ã¤ã³ããã¯ã¹ã¨ã»ã«ã³ããªã¤ã³ããã¯ã¹ ãã§ã«InnoDBã®ã¤ã³
DBã¨ã³ã¸ãã¢ã®ããã®æè¡åå¼·ä¼ã¨ããã¤ãã³ãã§ããªã¬ã¼ã·ã§ãã«ã¢ãã«ã«ãããDBè¨è¨ã«ã¤ãã¦è©±ãæ©ä¼ãé ããããªã¬ã¼ã·ã§ãã«ã¢ãã«ã¯é常ã«éè¦ã§ããã«ãé¢ããããç¾å ´ã§ã¯ãªããããã«ããã¦ãã¾ã£ã¦ããããã®çµæãã¢ããªã±ã¼ã·ã§ã³ã®ãã¸ãã¯ãä¸æãã¯ã¨ãªã§è¡¨ç¾ã§ãããéçºç¾å ´ã§ã¯éå¹çãªéçºãè¡ãããå¤ãã®äººããã¹ãçãªç¶æ³ã«è¿½ãè¾¼ã¾ãã¦ãããããããå±æ©æèã«ã¤ãã¦ãããã¾ã§ä½åº¦ãæ¬ããã°ã§ãæ¸ãã¦ããããWEB+DB Pressã§é£è¼ãã¦ããåæ©ããã®ç¹ã«ããããªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ã¯ãã¯ããªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ã¨ãã¦ä½¿ãã¹ãã ããã®ããã®éµã¨ãªãã®ããDBè¨è¨ã§ããã ä»åã¯ãªãã¨ç´2æéã®æã¡æéãé ããããªã¬ã¼ã·ã§ãã«ã¢ãã«ã«ã¤ãã¦ã¯ããã¾ã§ä½åº¦ã話ãæ©ä¼ãé ãããã2æéã¨ããã®ã¯æé·è¨é²ã§ãããããã«åããã¦ã¹ã©ã¤ããããªã¥ã¼ã ãã£ã·ãã®ãã®ã«ãªã£ããéå»ã®ã¹ã©ã¤ãã¨
MySQLã®masterã¨slave 1:1ã«ãã¦åç §ãslaveåããã®ã£ã¦ããããã人å¤ãã¿ããã ãã©ãæ§è½ãããã¦ä¸ãããªãå²ã«å¯ç¨æ§è½ã¡ãã ãã ãããããããã£ã³ãã¼ã³ 2011-06-19 00:16:30 via YoruFukurou MySQL ã¯ã¬ããªã±ã¼ã·ã§ã³ãç°¡åã«æ§æã§ããã®ã§ãããææ master 1å° ã«å¯¾ã㦠slave 1å°ãæ´æ°å¦ç㯠master ã«ãåç §ã¯ slave ã«ãã¨ããæ§æãç®ã«ãã¾ãã å人çã«ã¯ãã®æ§æã¯ãå§ãã§ãªãã¨æã£ã¦ããã®ã§ããã®çç±ãèå¯ãã¦ã¿ã¾ãã 1. å¯ç¨æ§ãè½ã¡ã å½ç¶ã§ãããmaster, slave ã®ã©ã¡ããè½ã¡ã¦ãå½±é¿ãåããããã«å¯ç¨æ§ãä½ä¸ãã¾ãã 2. å ¨ä½ã®æ§è½ãã»ã¨ãã©ä¸ãããªã master 1å°ã§ãã¹ã¦ã®ã¯ã¨ãªãå¦çããå ´åã¨æ¯ã¹ã¦ãå¯ç¨æ§ãè½ã¡ãå¼ãæãã¨ãã¦è¦åã£ãæ§è½åä¸ãå¾ãããããã¨ãã
社å ã§å°ã話é¡ã«ãªã£ãã®ã§ã éç¨ä¸ã®è©±ã¯fujiwaraããã® MySQLãmaster:slave=1:1æ§æã«ãã¦åç §ãslaveã«åããã®ããªãè¯ããªãã - é æ¥è¨ ã¯ã¦ãªæ¯åº MySQLã§åç §ã®è² è·åæ£ãè¡ãslaveã¯3å°ããæ§æããã®ãããã®ã§ã¯ - é æ¥è¨ ã¯ã¦ãªæ¯åº ãã¿ã¦ãã ããã æè¿ãæ°ãããµã¼ãã¹ãã§ããããæ°è¦æ©è½ã§ãã¼ã¿ãã¼ã¹ã追å ããéã«ã¯å¿ ãå ¨ã¦ã®åç §ãmasterã«åãã¦ããã£ã¦ãã¾ããçç±ã¯ä¸è¨ã®ã¨ã³ããªãèªãã§ãã ããããã®ãããªæ§æãåããã®ã¯ãã¡ããæ§è½çã«ããã§åé¡ãªãããã§ãã æ°ãããã¼ãã¦ã§ã¢ã«ãè¨å®ãããMySQLãåé¡ã®ãªãããã«æ¸ãããSQLã§ããã°ãæ°åQPSã¯ä½è£ã«ãã¾ãå°ãé å¼µãã°æ°ä¸QPSãä¸å°ã§è³ãã¾ãããªã®ã§å¤§ä½ã®ãµã¼ãã¹ã¯masterä¸å°ã§ååã§ãã ããã«ãã®èãæ¹ãé²ãã¦ãWebã¢ããªã±ã¼ã·ã§ã³ã®ä¸ã§ sub d
徳島ãªã¼ãã³ã»ããã¼ã¨ããã¤ãã³ãã«æãã¦é ããMySQLã®éç¨ã¾ããï¼ï¼ï¼ã®è©±ã«ã¤ãã¦è©±ãæ©ä¼ã«æµã¾ãããéç¨ã¨ããã¤ã¤éç¨ä»¥å¤ã®è©±ãè²ã æ··ãã£ã¦ããããå¹³ããè¨ãã¨ãMySQLã使ãä¸ã§èºãããããã¤ã³ããã¨ããã®ãä»åã®ãé¡ã§ãããã»ããã¼ã§ç¨ããè³æãå ¬éããã®ã§æ°ã«ãªã人ã¯åèã«ãã¦æ¬²ããã¨æãã 以å岡山ã¸å¼ãã§ããã ããã¨ããæããã®ã ãããã¯ãä¼æ¥ã«åå¼·ä¼ã¸åå ãããã ããã£ã¦ãçããåå¼·ç±å¿ã§ãããé¦é½åã®ããã«æ¯æ¥ä½ãããã®åå¼·ä¼ãããã¨ãããããªæµã¾ããç°å¢ã¯ã徳島ã«ã¯ãªãããç¥ããªããã ããã¹ãã«åä¸ã«å¯¾ããçå£ãªå§¿å¢ã¯åãã¨ãå£ããªãããã«æããããã æ親ä¼ã§ã¯ãLibreOfficeã®æ¦æ°ã¨è²ã ã¨æè¦ã交æããã¦é ãããï¼ã¨ããããäºäººã§ããªã話ãè¾¼ãã§ãã¾ã£ãæããããï¼ä½ãé ããæ¦æ°ã¨ã¯å対é¢ã ã£ãã®ã ããæ¦æ°ãã½ããã¦ã§ã¢ã®èªç±ã大åã ã¨èããè¨ãã°åå¿
Twitterã§è©±é¡ã«ãªã£ã¦ãã®ã§ç°¡åã«ã¾ã¨ãã¾ããã âMyISAMã«ããç¡ãæ©è½ã使ãããå ´åã¯MyISAMã使ããããªã ã»å ¨ææ¤ç´¢ (TritonnãSphinx) ã»GIS âInnoDBã®å©ç¹(MyISAMã®æ¬ ç¹) â²é害対å¿ç³» ã»ã¯ã©ãã·ã¥ãã¦ãåèµ·åããã ãã§ãªã«ããªãã§ãã ã»ã¯ã©ãã·ã¥ãªã«ããªã«ãããæéã¯ãã¼ãã«ãµã¤ãºã«æ¯ä¾ãããããªãã¨ã¯ãªããã³ãããæ¸ã¿ã®ãã¼ã¿ã¯ä¿®å¾©ã§ãã (巨大ãªMyISAMãã¼ãã«ã®REPAIRã«ã¯æ°æ¥åä½ã§æéãããããã¨ããã) ã»ãªã³ã©ã¤ã³ããã¯ã¢ãããã§ãã ã»INSERTãLOAD DATAãªã©ãå®è¡ãã¦ããéä¸ã§Ctrl+Cã§ãã®æ´æ°ç³»SQLæãæ¢ãã¦ãããã¼ãã«ã¯å£ããªãããä¸éå端ãªç¶æ ã§æ´æ°ããããã¨ãç¡ãããã¹ã¬ã¼ããæ¢ã¾ããã¨ãç¡ã â²æ§è½ç³» ã»è¡ã¬ãã«ããã¯ãªã®ã§ä¸¦åæ§ãé«ã(MyISAMã¯ãã¼ãã«ããã¯)ãã¾ãSEL
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}