ãªã¹ãå šäœã4ã€ã®éšåã«åããŸãã æåã®ãå€ãã®æãéèŠãªéšåã§ã¯ãããã©ãŒãã³ã¹ã«äœããã®åœ¢ã§é¢é£ããå€æŽããªã¹ãããŸãã 2çªç®ã§ã¯ãããŒã¿ããŒã¹ããã°ã©ãåãã®æ°æ©èœã®ãªã¹ããæäŸããŸããããã¯ãæ¢ã«ããã»ã©è匱ã§ã¯ãªãPostgreSQLã®ãæ©èœãã®ã»ãããããã«æ¡åŒµããããã«èšèšãããŠããŸãã 3çªç®ã®éšåã¯ãããŒã¿ããŒã¹ç®¡çè åãã®é©æ°ã«å°å¿µããŸãã æåŸã«ãæåŸã«ãPostgresãµãã©ã€ããããžã§ã¯ãã§ãããªãŒãã³ãœãŒã¹ãããžã§ã¯ãã«ã€ããŠèª¬æããŸãïŒã€ãŸããç¬èªã®éçºãµã€ã¯ã«ããããŸãïŒã
æ§èœ
ãããããä»æ¥ïŒå®å®ãã©ã³ãã8.2ãçŸåšã®ããŒãžã§ã³ã¯8.2.5ïŒPostgreSQLã¯ããªãŒãã³ãœãŒã¹ã®éžæè¢ã ãã§ãªããäž»èŠãªåçšDBMSãšã®ããã©ãŒãã³ã¹ã®é¢ã§ã競åããŠããŸãã Oracleãªã©ã ããã¯ãã¯ã空ã®ãã¬ãŒãºã§ã¯ãããŸããããµã³ãå®æœãããã¹ãã®çµæãèŠãŠãã ããã ããé ã象ã¯ããŸããïŒ è±å¯ãªçš®é¡ã®ã€ã³ããã¯ã¹ãã·ã¹ãã ã®ãã¥ãŒãã³ã°ãéåžžã«å€§ããªããªã¥ãŒã ãšè² è·ã®æäœãè€è£œããã³ã¹ã±ãŒãªã³ã°ã·ã¹ãã ã®é©åãªéžæã®å¹ åºãå¯èœæ§-ãããã¯ãã¹ãŠãçŸä»£ã®è±¡ã«ãšã£ãŠãå³ããããã®ã§ãã éçºé床ã§ãããä»ã®DBMSãšæ¯èŒããŠPostgresãæå©ã«åºå¥ããŸããæ¯å¹Žãç§ãã¡ã¯åžžã«éèŠãªäžæ©ãèžã¿åºããŸãã
PostgreSQLããŒãžã§ã³8.3ã®ããã©ãŒãã³ã¹ã®æ°æ©èœã¯äœã§ããïŒ å€ãã®å€æŽã¯éèŠã§ãã PostgreSQLéçºã³ãŒãã£ããŒã¿ãŒã®Bruce Momjianã«ãããšãPostgresmanã®æåŸ ã§å°ãåã«ã¢ã¹ã¯ã¯ã蚪ãã人ã«ãããšãPostgresã®éçºè ãè¿å¹Žå¿ããããŠããã·ã¹ãã ããã©ãŒãã³ã¹ã®æé©åäœæ¥ã¯éåžžã«å°é£ã§ãã åã¹ãããã«ã¯ããŸããŸãå€ãã®äººä»¶è²»ãå¿ èŠã§ãããéçºè ã®æéãšåŽåããŸããŸãå¿ èŠã«ãªããŸãã
ãããã®æ¬åœã«éèŠãªå€æŽã®1ã€ã¯ã HOTïŒããŒãã®ã¿ã®ã¿ãã«ïŒãšåŒã°ããããããããšå®å šã«èããããšãã§ããŸãã ããã¯ããããããã©ãŒãã³ã¹ã®é¢ã§æãéèŠãªå€æŽã®1ã€ã§ãã ãã®å€æŽã®å 容ãç解ããã«ã¯ãPostgreSQLããããããã«ãããŒãžã§ã³ã¢ã¯ã»ã¹å¶åŸ¡ã¢ãã«ïŒ MVCC ããã«ãããŒãžã§ã³åæå®è¡å¶åŸ¡ïŒãå®è£ ããŠããããšãèŠããŠããå¿ èŠããããŸãã
HOTã®æ¬è³ªã¯æ¬¡ã®ãšããã§ãã 以åããã®ã¢ãããŒããå®è£ ããåã«ãããŒãã«ã®è¡ãæŽæ°ãããšããã€ã³ããã¯ã¹ä»ãåããããã®å€æŽã«åœ±é¿ãäžãããã©ããã«é¢ä¿ãªããããŒãã«ã®è¡ãæŽæ°ãããã³ã«ãã¹ãŠã®ã€ã³ããã¯ã¹ã®æ°ããããŒãžã§ã³ã衚瀺ãããŸããïŒå³ãHOTãªãã®æŽæ°ããåç §ïŒã ããã§ãæ°ããããŒãžã§ã³ã®è¡ãåã®ããŒãžã§ã³ãšåãã¡ã¢ãªããŒãžã«åé¡ãããã€ã³ããã¯ã¹ãäœæãããåãå€æŽãããªãã£ãå Žåãã€ã³ããã¯ã¹ã¯åããŸãŸã§ãã ããããããã ãã§ã¯ãããŸããã ãã®ãããªå¯èœæ§ãããå ŽåãããŒãããŒãžå ã®ã¹ããŒã¹ã®ãç¬éçãªãåå©çšãçºçããŸãã åœç¶ãVACUUMæäœäžã«å®è¡ãããäœæ¥éãæžå°ããŸãã å³ ãHOT updateãã¯ãè¡ãã©ã®ããã«æŽæ°ãããããæŠç¥çã«ç€ºããŸãã
次ã®æ°èŠæ§ã¯ããŸã第äžã«ãå€æ°ã®Webéçºè ã«ã¢ããŒã«ããŸãã ããŒãžã§ã³8.3以éãPostgreSQLã®ãã©ã³ã¶ã¯ã·ã§ã³ã¯éåæã«ããããšãã§ããŸã ã
ã€ãŸãããã©ã³ã¶ã¯ã·ã§ã³ã³ãããæäœïŒCOMMITïŒãå®è¡ããããšãPostgreSQLãµãŒããŒã¯ãé«äŸ¡ãªãã©ã³ã¶ã¯ã·ã§ã³ãã°åæïŒWAL fsyncïŒæäœãå®äºãããŸã§åŸ æ©ããŸããã ã€ãŸãããã¹ãŠã®è«çæ¡ä»¶ãæºãããããšããã«ããã©ã³ã¶ã¯ã·ã§ã³ã¯æ£åžžã«å®äºãããšèŠãªãããŸãïŒå¿ èŠãªæŽåæ§å¶çŽããã¹ãŠãã§ãã¯ãããŸãïŒã ç©ççã«ããã©ã³ã¶ã¯ã·ã§ã³ãã°ã¯éåžžã«çãæéã§æžã蟌ãŸããŸãïŒéåžžãæ£åžžã«æ©èœããã·ã¹ãã ã§ã¯ãããã¯æ倧200ã1000ããªç§ã§ãïŒãç°å¢å€æ°synchronous_commitã¯ããã©ã³ã¶ã¯ã·ã§ã³ã®ç¶æ ïŒåæ/éåæïŒãæ åœããŸãã éåæã¢ãŒããžã®åãæ¿ãã¯ç°¡åã§ãã
SET synchronous_commit TO OFF;
éåæãã©ã³ã¶ã¯ã·ã§ã³ã¯ãfsyncæäœãç¡å¹ã«ãªã£ãŠãããµãŒããŒæäœã¢ãŒãã®ä»£æ¿ã§ã¯ãªãããšã«æ³šæããŠãã ããã å®éã«ã¯ãfsync = offã¢ãŒãã¯ãããŒã¹ã®äžè²«æ§ã®ãªãç¶æ ã«ã€ãªããå¯èœæ§ãããïŒããšãã°ãäºæããªãæ©åšã®æ éãé»åæ倱ã®å ŽåïŒãä¿¡é Œæ§ã®é«ãæ©åšã䜿çšãããŠããå Žåã«ã®ã¿æšå¥šãããŸãïŒããšãã°ãããããªãŒä»ãã®ãã£ã¹ã¯ãã©ã€ãã³ã³ãããŒã©ãŒïŒã æ°ããæ©èœã䜿çšããŠããããŒã¿ã®äžæŽåã¯çºçããŸããã å¯èœãªæ倧å€ã¯ãããŒã¿ã®ããäžéšã®æ倱ã§ãïŒããããæ·±å»ãªãµãŒããŒé害ïŒOSãããŒããŠã§ã¢ãé»æºé害ïŒã®å ŽåïŒã éåæãã©ã³ã¶ã¯ã·ã§ã³ã®å žåçãªäŸã¯ãããã€ãã®è¡ã®æ倱ãé倧ã§ãªãå Žåã«ãããŒãã«ãã°ïŒããšãã°ããŠãŒã¶ãŒã¢ã¯ã·ã§ã³ã®ãã°ïŒã«å€§éã®æ å ±ãæ ŒçŽããã¿ã¹ã¯ã§ãã ãã ãããã¹ãŠã®éèŠãªãã©ã³ã¶ã¯ã·ã§ã³ã¯åŒãç¶ãåæã§ããŸãã
å¥ã®ããã©ãŒãã³ã¹ã®åäžã¯ãPostgreSQLãã¯ãšãªïŒSeqScanæäœïŒãå®è¡ãããšãã«ããŒãã«ãé 次ã¹ãã£ã³ããç¶æ³ã«é¢é£ããŠããŸãã ããŒãžã§ã³8.3ããåã®å Žåããã®ãããªå Žåãç°ãªãPostgresããã»ã¹ãåããžã§ããåæã«å®è¡ãããšããç¶æ³ããã°ãã°çºçããŸãã- åæã¹ãã£ã³ïŒãåæãã¥ãŒãïŒã®å®è£ ã®ãããã§ãåãããŒãã«ãåæã«èŠãããã«ãªããŸãã1ã€ã®ããŒãã«ã®æéã¯1åã®ã¹ãã£ã³ã§ããå®è¡ã§ããŸããã ããã¯æ¬¡ã®ããã«éæãããŸãã ã»ãã·ã§ã³å ã§ãSeqScanããã§ã«å®è¡ãããŠããããŒãã«ïŒå¥ã®ã»ãã·ã§ã³çšïŒã«SeqScanãå¿ èŠãªå Žåãæ¢ã«å®è¡ãããŠããSeqScanã®çµæãžã®ã移åäžã®ãžã£ã³ããããããŸãã ãã®ããã»ã¹ãå®äºãããšãå¿ èŠã«å¿ããŠãå¥ã®äžå®å šãªSeqScanã䜿çšããŠçµæããè£è¶³ããããŸãïŒå³ãåç §ïŒã
ãã§ãã¯ãã€ã³ãããã»ã¹ã·ã¹ãã ïŒãã³ã³ãããŒã«ãã€ã³ããïŒã«ãã£ãŠçããã¹ãã¬ã¹ã®åœ±é¿ã軜æžããäœæ¥ã¯ç¶ç¶ããŠããŸãããã§ãã¯ãã€ã³ãã¯ããã«å®è¡ãããã®ã§ã¯ãªããåŸã ã«å®è¡ãããŸããããã»ã¹ã¯æéå ã«ãåºããããŸãã ãããã£ãŠããã®å€æŽã®ååã¯ãã§ãã¯ãã€ã³ãå¹³æ»åã§ãã ãµãŒããŒãå®æçã«ã·ã£ããããŠã³ãããæ瀺çãªããã§ãã¯ãã€ã³ãæäœïŒ CHECKPOINTã³ãã³ãïŒãå®è¡ããŠããéãããŒã¿ã¯å¯èœãªéãé«éã«ãã£ã¹ã¯ã«æžã蟌ãŸããããšã«æ³šæããŠãã ããã
ããã©ãŒãã³ã¹ã®èª¬æãçµäºããããã«ãPostgreSQLã䜿çšããã·ã¹ãã ã®ããã©ãŒãã³ã¹ãæ¹åããããã«èšèšãããä»ã®å€æŽç¹ã®çããªã¹ãã以äžã«ç€ºããŸãã
- autovacuumã¯ããã©ã«ãã§æå¹ã«ãªããŸãã ã
- ç¶æ³ã«ãã£ãŠã¯ã è€æ°ã®èªåããã¥ãŒã ããã»ã¹ãäžåºŠã«éå§ã§ããããã«ãªããŸãã ïŒããšãã°ã倧ããªããŒãã«ãã¯ãªãŒãã³ã°ããé·ãããã»ã¹äžã«ãå°ããªããŒãã«ããã®ããã»ã¹ã®å®äºãåŸ ã€å¿ èŠããªããªããŸããïŒã
- ããŒã¿ããŒã¹ãå æãããã£ã¹ã¯å®¹éã®é¡èãªæžå° ïŒ1ïŒä»¥åã¯å³å¯ã«4ãã€ããå ããŠããvarlenaåããããŒïŒå¯å€é·ã®ããŒã¿åïŒããã¹ããé åãªã©ïŒã«ãããç¶æ³ã«ãã£ãŠã¯1ãã€ãã®ã¿ã 2ïŒããŒãã«è¡ããããŒã®ä¿åïŒä»¥åã¯27ãã€ããçŸåšã¯24ãã€ãïŒã
- ããŒã¿ãå€æŽããªããã©ã³ã¶ã¯ã·ã§ã³ã®å®è¡ã¯ããã©ã³ã¶ã¯ã·ã§ã³ã«ãŠã³ã¿ãŒïŒxidïŒã®å€ãå¢å ãããŸãã ãããã«ããããã©ã³ã¶ã¯ã·ã§ã³ã«ãŠã³ã¿ãŒã®éè€ïŒxidã©ããã¢ã©ãŠã³ãïŒã®å¯èœæ§ãå€§å¹ ã«æžå°ããŸãã ããã«ããã®å€æŽã¯ããã©ã³ã¶ã¯ã·ã§ã³ãã°ã®è»¢éã«åºã¥ãçµã¿èŸŒã¿ã®ãã¹ã¿ãŒã¹ã¬ãŒãã¬ããªã±ãŒã·ã§ã³ã®å®è£ ã«åããéèŠãªã¹ãããã§ããçŸåšããã¹ã¿ãŒããŒããšã¹ã¬ãŒãããŒãã®éã§xidã«ãŠã³ã¿ãŒã®éåæåã¯ãããŸããã
- bgwriterããã»ã¹ã®ãã©ã¡ãŒã¿ãèªå調æŽããã¡ã«ããºã ãå®è£ ãããŸãã ïŒããã¯ã°ã©ãŠã³ãã©ã€ã¿ã¯ãããŒãã£ãªããŒãã£ãããã¡ããã£ã¹ã¯ã«æžã蟌ãç¹å¥ãªããã»ã¹ã§ãïŒã
- "
âŠORDER BY ⊠LIMITâŠ
"ïŒããããTop-NãœãŒã ïŒã䜿çšããŠã¯ãšãªã®çµæãååŸããã¡ã«ããºã ãæé©åããŸããïŒå Žåã«ãã£ãŠã¯ãã·ã¹ãã ã¯å¿ èŠãªããŒã¿ããŒãžãRAMã«ä¿æããçµæã®åºåãéåžžã«é«éã«ããŸãã - ããã§ãïŒãããŸã§2ã€ã®å®æ°ã®åœ¢åŒã§ã®ã¿ïŒé¢æ°ãå®è¡ããæšå®ã³ã¹ããšè¿ãããè¡æ°ãæå®ã§ããããã«ãªããŸãããããã«ãããPostgreSQLãã©ã³ããŒã¯æé©ãªã¯ãšãªãã©ã³ãéžæã§ããŸãïŒäŸïŒ
ALTER FUNCTION log_data(text) COST 100000 ROWS 1
ïŒã
ããŒã¿ããŒã¹éçºè
ããã§æ³šæãã¹ãæãé¡èãªéèŠãªå€æŽã¯ã å šææ€çŽ¢ã¢ãžã¥ãŒã«ïŒcontrib / tsearch2ïŒã®ã·ã¹ãã ã³ã¢ãžã®ç§»è¡ã§ãã ãã·ã¢ã®éçºè Oleg BartunovãšFedor Sigaevã«ãã£ãŠéçºãããtsearch2ã¯ãé·ãéPostgresã®æã人æ°ã®ããcontribã¢ãžã¥ãŒã«ã§ãã å šææ€çŽ¢ãã«ãŒãã«ã«ç§»è¡ããããã®ãããã¯ã骚ã®æããé·ãäœæ¥ã®çµæãšããŠãã®å€ã«æ¡çšãããŸããïŒãããã®åãå ¥ãããŒãžã§ã³ã¯58ã§ãïŒïŒPostgreSQLããŒã ã®ããã€ãã®äž»èŠãªéçºè ã«ãã£ãŠããããžã§ã¯ãã®æŽå²ã®äžã§æ倧ã§ãã
tsearch2ã¢ãžã¥ãŒã«ã®ãã¹ãŠã®æ©èœãããã©ã«ãã§äœ¿çšå¯èœã«ãªããæ°ããPostgreSQLããŒãžã§ã³ãžã®ç§»è¡ããã»ã¹ãå€§å¹ ã«ç°¡çŽ åããããšããäºå®ã«å ããŠãèŸæžãšããã¹ãåŠçã«ãŒã«ã®æ§æãããç°¡åã«ãªããŸãïŒåºæ¬çãªæ§ææäœã¯ãã¹ãŠSQLã³ãã³ãã䜿çšããŠå®è¡ãããŸãã ããã§ã¯ãããšãã°ãç°¡åãªã·ãœãŒã©ã¹èŸæžãäœæã§ããŸãã
ããã¹ãæ€çŽ¢èŸæžã®äœæthesaurus_astroïŒ TEMPLATE =ã·ãœãŒã©ã¹ã DictFile = thesaurus_astroã èŸæž= english_stem ïŒ; ALTER TEXT SEARCH CONFIGURATIONãã·ã¢èª lwordãlhwordãlpart_hwordã®ãããã³ã°ãè¿œå WITH thesaurus_astroãenglish_stem;
ã€ã³ããã¯ã¹äœæããã»ã¹ãç°¡çŽ åãããŸããã éåžžã®ããã¹ãåã®äžã«GINã€ã³ããã¯ã¹ãäœæããäŸïŒè¿œå ã®åãšããªã¬ãŒãäœæããã«ïŒïŒ
ã€ã³ããã¯ã¹äœæpgweb_idx ON pgweb USING ginïŒto_tsvectorïŒ 'russian'ãtitle || bodyïŒïŒ;
ãŸããé¢é£æ§ã«ããã©ã³ãã³ã°ã䜿çšããã¯ãšãªã®äŸã¯ãç¹æ®é¢æ°plainto_tsqueryã䜿çšããŠtsqueryãååŸããŸãïŒæåã®ãšã¹ã±ãŒããå¿ããŠããã¬ãŒã³ããã¹ããtsqueryã«ãã°ããç°¡åã«å€æã§ããŸãïŒã
éžæ ts_rank_cdïŒtextsearch_indexãqïŒASã©ã³ã¯ãã¿ã€ãã« ãã pgwebãplainto_tsqueryïŒãè¶ æ°æãïŒq ã©ã q @@ textsearch_index ORDER BY ã©ã³ã¯DESC LIMIT 10;
ãã1ã€ã®æ³šç®ãã¹ãå€æŽç¹ã¯ããã®èšäºã®èè ãåå ããXMLãµããŒãã§ãã ãã®æ©èœã¯ãSQLïŒ2003æšæºïŒæšæºã®14çªç®ã®éšåãSQL / XMLïŒã«åŸã£ãŠå®è£ ãããŠããŸãã
ãŸããã«ãŒãã«ã«ã¯ç¹å¥ãª
xml
ããŒã¿åãçµã¿èŸŒãŸããŠããŸãã ãã®ã¿ã€ãã䜿çšããå ŽåããµãŒããŒã¯ããŒã¿ãæ£ãã圢æãããŠãããã©ããã確èªããŸãïŒ æŽåœ¢åŒãã§ã㯠ïŒã ããã«ãããã¥ã¡ã³ãã®äžéšã®æäœãèš±å¯ããããŠãŒã¹ã±ãŒã¹ããããŸãïŒããã«ããã
xml
ããŒã¿åã§XMLãæäœããããã®ãã¯ããŒãºãé¢æ°ã®ããããã£ãæäŸã§ããŸãïŒã
SQLïŒ2003æšæºã«åŸã£ãŠããªã¬ãŒã·ã§ãã«ããŒã¿ãXMLã«å€æããããã®äžé£ã®é¢æ°ïŒããããSQL / XMLçºè¡é¢æ°ïŒãå®è£ ãããŠããŸãã XMLããŒã¿ãçæãããªã¯ãšã¹ãã®ç°¡åãªäŸã次ã«ç€ºããŸãã
SELECT XMLROOTïŒ XMLELEMENTïŒ NAME 'some'ã XMLATTRIBUTESïŒ 'val' AS 'name'ã 1 + 1 AS 'num' ïŒã XMLELEMENTïŒ NAME 'more'ã ãfooã ïŒ ïŒã ããŒãžã§ã³ã1.0ãã ã¹ã¿ã³ãã¢ãã³ã¯ã ïŒ;
ããã«ãDTDæ€èšŒã®ãµããŒãïŒ
xmlvalidatedtd()
é¢æ°ïŒãXPathåŒã®è©äŸ¡ã®ãµããŒãïŒxmlããŒã¿åããé åãè¿ã
xpath()
é¢æ°ïŒãããã³XMLïŒ
tabletoxml()
é¢æ°ã
tabletoxml()
ãªã¬ãŒã·ã§ãã«ããŒã¿ã®ç°¡æå ¬éã®ããã®ä»£æ¿é¢æ°ã
querytoxml()
ãªã©ïŒã
XMLããŒã¿ã§ã®ã¯ãšãªã®å®è¡ãé«éåããããã«ãæ©èœçãªbtreeã€ã³ããã¯ã¹ãšGINã€ã³ããã¯ã¹ãããã³XMLããŒã¿ã®ãã«ããã¹ãæ€çŽ¢ã䜿çšã§ããŸãã XPathåŒã®è©äŸ¡ã«åºã¥ããŠbtreeã€ã³ããã¯ã¹ãäœæããäŸã次ã«ç€ºããŸãã
CREATE INDEX i_table1_xdata ON table1 USING btreeïŒ ïŒïŒxpathïŒ '// person / @ name'ãxdataïŒïŒ[1]ïŒ ïŒ;
ããŒã¿åã«é¢ããŠãPostgreSQL 8.3ã§ã¯å€ãã®é©æ°ãå°å ¥ãããŠããŸããã«ãŒãã«ã«çµã¿èŸŒãŸãã
tsquery/tsvector
ããã³
xml
åã«å ããŠã以äžãç»å ŽããŸããã
- 圌ãã®SQLãã移è¡ãããŠãŒã¶ãŒãå«ããäžéšã®ãŠãŒã¶ãŒã®å©äŸ¿æ§ã®ããã®
enum
ïŒãŠãŒã¶ãŒå®çŸ©ã®åæããŒã¿åïŒã - GUID / UUIDããŒã¿åïŒcontribã¢ãžã¥ãŒã«ãšããŠïŒ;
- è€ååã®é å ïŒããšãã°ããŠãŒã¶ãŒå®çŸ©åïŒã
ãããŠæåŸã«ãä»ã®å€æŽç¹ã®çããªã¹ãïŒ
- PL / pgSQLé¢æ°ã®ã¯ãšãªãã©ã³ãã£ãã·ã¥ã®èªåç¡å¹å ã
- ã
CREATE FUNCTION ⊠RETURNS TABLE
ãããã³ãRETURN TABLEâŠ
ããæ§ç¯ããŠãããŒãã«ãçæããé¢æ°ãäœæããŸãã - ã«ãŒãœã«ã®æŽæ°æäœã®ãµããŒãã
- æšæºïŒISO / ANSI SQLïŒ
ORDER BY ⊠NULLS FIRST/LAST
ã³ã³ã¹ãã©ã¯ãã¯ãNULLå€ã®é åºã®èšå®ãç°¡çŽ åããŸãïŒä»ã®DBMSãã移è¡ããå Žåã«ã圹ç«ã¡ãŸãïŒã - GiSTã€ã³ããã¯ã¹ã®NULLå€ã®ã€ã³ããã¯ã¹ä»ãã
ããŒã¿ããŒã¹ç®¡çè
DBAã®å¯¿åœã延ã°ãããšãç®çãšãããã®ã®å€ãã¯äžèšã§èª¬æãããŠããããããã®ã»ã¯ã·ã§ã³ã¯äžååã§ããããšãå€æããŸãã:-)ããã«ãããããããæ®ãã®éšåã«ã€ããŠç°¡åã«èª¬æããŸãã
ã¯ãšãªãã©ã³ïŒ EXPLAIN ANALYZEã³ãã³ãïŒã¯ãã©ã®ãœãŒãã¢ã«ãŽãªãºã ãéžæãããã©ã®ãããã®ã¡ã¢ãªãæ¶è²»ããããã衚瀺ããããã«ãªããŸãã ã
ã¯ãšãªãã©ã³ -------------------------------------------------- ----- 䞊ã¹æ¿ãïŒã³ã¹ã= 34.38..34.42è¡= 13å¹ = 176ïŒïŒå®éã®æé= 0.946..0.948è¡= 6ã«ãŒã= 1ïŒ ãœãŒãããŒïŒobj2tag.o2t_tag_name ãœãŒãæ¹æ³ïŒã¯ã€ãã¯ãœãŒãã¡ã¢ãªïŒ18kB <-ãã¡ããã芧ãã ããïŒ ->ããã·ã¥çµåïŒã³ã¹ã= 19.19..34.14è¡= 13å¹ = 176ïŒïŒå®éã®æé= 0.812..0.835è¡= 6ã«ãŒã= 1ïŒ [...]
Simon Riggsã«ãã£ãŠäœæãããç¹å¥ãªpg_standby contribã¢ãžã¥ãŒã«ã¯ãWAL転éãã°ãã°ã«åºã¥ããŠãŠã©ãŒã ã¹ã¿ã³ãã€ãµãŒããŒãã»ããã¢ãããã管çè ã®äœæ¥ãç°¡çŽ åããŸãã ãã®ã¢ãžã¥ãŒã«ã¯çŽç²ãªCã§èšè¿°ãããŠãããããæ°ãããã©ãããã©ãŒã ã«ç°¡åã«æ¡åŒµããã³ç§»æ€ã§ããŸãïŒå°ãªããšãLinuxããã³Win32ã§ããã©ãŒãã³ã¹ããã¹ãæžã¿ã§ãïŒã
é¢æ°ãå®çŸ©ãããšãã«ãç¹å®ã®é¢æ°ã®ãã¬ãŒã ã¯ãŒã¯å ã§ã®ã¿åäœããç°å¢å€æ°ãåå®çŸ©ããããšãå¯èœã«ãªããŸããïŒ å€æ°ã®å€ãé¢æ°ã«ãã€ã³ã ïŒã ããšãã°ãããã¯
log _data()
é¢æ°ã®å®è¡ããã©ã³ã¶ã¯ã·ã§ã³ãéåæã¢ãŒãã«åãæ¿ããããšãæå®ããæ¹æ³ã§ãã
ALTER FUNCTION log_dataïŒããã¹ãïŒ SET synchronous_commit TO OFF;
ããŠããããŠãäŒçµ±çã«ããã®ã»ã¯ã·ã§ã³ã®ä»ã®æ°è£œåã®çããªã¹ãïŒ
- GSSAPIãµããŒã
- Win32ãã©ãããã©ãŒã ã§ã®ãã«ãã®æ¹å ïŒMinGWã¯äžèŠã«ãªããŸãããã¢ã»ã³ããªã¯MS VC ++ã§è¡ãããŸããããã«ãããWindowsã§ã®ããã©ãŒãã³ã¹ãåäžããŸãïŒã
- ã€ã³ããã¯ã¹ãèæ
®ããŠåãæ¹æ³ã§ããŒãã«ãäœæããŸã ïŒäŸïŒ
CREATE TABLE dict2 (LIKE dictionary INCLUDING INDEXES
ïŒïŒã
è¿œå ãããžã§ã¯ã
EnterpriseDB ïŒåŸæ¥å¡ã¯ã¢ã¯ãã£ããªPostgreSQLéçºè ã§ããã8.3ã®ããã©ãŒãã³ã¹ã®å€æŽã®å€ãã¯ã¡ãªããã§ãïŒã¯ãæšæºã®pgAdminIII管çããŒã«ã§PL / pgSQLé¢æ°ããããã°ããŠãããã¡ã€ãªã³ã°ãå®è¡ã§ããcontribã¢ãžã¥ãŒã«ã§ããpldebuggerãããã¬ãŒããªãªãŒã¹ããŸãã ã
ãã®ãããžã§ã¯ãã¯çŸåšãç¬ç«ããcontribã¢ãžã¥ãŒã«ïŒ PgFoundryã§æäŸ ïŒãšããŠååšããå€æ°ã®ãã©ãããã©ãŒã ïŒLinuxããã³Win32ãå«ãïŒã§åäœããŸãã ãã®ã¢ãžã¥ãŒã«ã¯Postgresã®ããŒãžã§ã³8.2ã§ãåäœããããšã«æ³šæããŠãã ããã
å°ãåã«èšã£ãããã« ã Skype ïŒååã®æåãªãããžã§ã¯ãã§PostgreSQLã䜿çšïŒã¯ã倧èŠæš¡ãªéçºè ãµãŒã¯ã«ã«åœ¹ç«ã€ããã€ãã®è£œåããªãŒãã³ãœãŒã¹ã§ãªãªãŒã¹ããŸããã ãã®äžã§ãããŸã第äžã«ãéåžžã«è»œéãªPgBounceræ¥ç¶ãããŒãžã£ãŒã§ããïŒã¢ããªã±ãŒã·ã§ã³ã®ããžãã¹ããžãã¯å šäœãã¹ãã¢ãããã·ãŒãžã£ãšããŠå®è£ ãããŠããå ŽåïŒå®è³ªçã«å¶éãªãã«æ°Žå¹³ã¹ã±ãŒãªã³ã°ãçµç¹ã§ããæ¬äŒŒèšèªPL / Proxyã«æ³šç®ãã䟡å€ããããŸãã Skypeéçºè ãŸãŒã³ããŒãžãã芧ãã ãããå€ãã®èå³æ·±ããã®ãèŠã€ãããŸãïŒ
2007幎ã®æ¥ãšå€ã®å€ããç®ã«ãã·ã³ãã«ã§äŸ¿å©ãªpgFouineãã°åæããŒã«ã®ããŒãžã§ã³1.0 ããªãªãŒã¹ãããŸãã ã ãã®ããã°ã©ã ã¯ãããŒã¿ããŒã¹ãµãŒããŒã®ããã»ããµãäœããããã調ã¹ãã®ã«åœ¹ç«ã¡ãŸãã pgFoiuneã¯Postgresã¯ãšãªãã°ãåæãïŒã¯ãšãªãã®ã³ã°ãæå¹ã«ããå Žåã以äžã®æéå¶éãå°å ¥ããããšããå§ãããŸã
log_min_duration_statement
ãã©ã¡ãŒã¿ãŒã®èª¬æãåç §ïŒãæãé ãã¯ãšãªããšã©ãŒãããã³äžè¬çãªçµ±èšã«é¢ããã¬ããŒããæäŸããŸãïŒ äŸãåç §ïŒã ãããã£ãŠããã®ããŒã«ã䜿çšãããšãããŒã¿ããŒã¹éçºè ã¯ãPostgreSQLã䜿çšããŠã¢ããªã±ãŒã·ã§ã³ãé«éåããããã«æ¹åã§ããã¯ãšãªãç解ã§ããŸãã
æåŸã«ãæ®ãã®è£œåã«ã€ããŠç°¡åã«èª¬æããŸãã
- pgSNMPãããžã§ã¯ãã¯ãPostgreSQLïŒãµãŒããŒã¹ããŒã¿ã¹ã¢ãã¿ãªã³ã°ïŒçšã®SNMPãšãŒãžã§ã³ãã®å®è£ ã§ãã
- SEPostgres - SELinuxæ¡åŒµã»ãã¥ãªãã£ã¢ãã«ã«åºã¥ãæ¡åŒµæ©èœã
- ã€ã³ããã¯ã¹ã®äœæã«é¢ããããŒã¿ããŒã¹ç®¡çè ãžã®æšå¥šäºé ãæäŸããããŒã«ãäœæããããã®ãããªã€ã³ããã¯ã¹ã䜿çšå¯èœãªå Žåãã¯ãšãªãå®è¡ããããã®å¯èœãªèšç»ã瀺ããŸãïŒ Index Advisor ïŒ
- Web管ççšã®æåãªããŒã«phppgadminã« Slonyã¯ã©ã¹ã¿ãŒãå šææ€çŽ¢ãèªåããã¥ãŒã èšå®ãæ§æããæ©èœãç»å ŽããŸããïŒãŸãã¯ç»å Žãããã§ãïŒã
ãããã«
ããŒãžã§ã³8.3ã¯ãäŒæ¥åãã®å®å šãªããŒã¿ããŒã¹ç®¡çã·ã¹ãã ã«åãã次ã®ã¹ãããã§ãã çç£æ§ã®èªæã§ãªãæ¹åããŠãŒã¶ãŒã®ããŒãºã«ãã£ãŠæ±ºå®ãããæ©äŒã®åºçŸãå€ãã®è¡æãããžã§ã¯ãã®æ¡å€§-ãããã¯ãã¹ãŠãPostgreSQLã®èªä¿¡ãšè¿ éãªéçºã瀺ããŠããŸãã
ãã®ã¬ãã¥ãŒãæžããšããèè ã¯æ¬¡ã®ãœãŒã¹ã䜿çšããŸããã
- pgwiki / WhatsNew83
- pgwiki / Feature_Matrix
- pgwiki / 8.3_Changelog
- pgwiki / TodoïŒPatchStatus
- ã¢ã¹ã¯ã¯ã®Highload-2007ã«ã³ãã¡ã¬ã³ã¹ã§ã®Bruce Momjanã«ããã¬ããŒãïŒ pdf ïŒã
- å ¬åŒã®PostgreSQL 8.3ããã¥ã¡ã³ã ã
- Pgsql-hackersã¡ãŒãªã³ã°ãªã¹ãã¢ãŒã«ã€ãã