æ°æ®ãä¸é¢Navicatå®ç½å°è¯¦è§£Navicat for PostgreSQL表索å¼ã
æ¹æ³/æ¥éª¤
å¨ Navicat for PostgreSQLâç´¢å¼âé项å¡ï¼åªéç¹å»ç´¢å¼æ ä½å³å¯ç¼è¾ã使ç¨ç´¢å¼å·¥å
·æ ï¼ä¾¿å¯ä»¥å建æ°çãç¼è¾æå é¤éå®çç´¢å¼æ ä½ã
â æ·»å ç´¢å¼ï¼æ·»å ä¸ä¸ªç´¢å¼å°è¡¨ã
â å é¤ç´¢å¼ï¼å é¤å·²éæ©çç´¢å¼ã
2
åç¼è¾æ¡ï¼è®¾ç½®ç´¢å¼åã没æ模å¼åå¯ä»¥å
å«å¨è¿éï¼ç´¢å¼æ»æ¯å建ä¸å®çä¸çº§è¡¨ç¸åç模å¼ãè¦å¨ç´¢å¼å
å«æ ä½ï¼åªéç®åå°åå»æ ä½æç¹å»âæ ä½âæé®å°±è½å¨æå¼çç¼è¾å¨ä¸ç¼è¾ã注æï¼ä¸äºæ ä½ç±»åä¸å®¹è®¸ç±å¤ä¸ªæ ä½ç´¢å¼ã
ç´¢å¼æ¹æ³ï¼ä¸æå表å®ä¹è¡¨ç´¢å¼çç±»åã
3
å¯ä¸é®ï¼ä½¿å¾ç´¢å¼ç¬ä¸æ äºï¼å½å建索å¼ä»¥åæ¯æ¬¡æ·»å æ°æ®æ¶ï¼ç³»ç»æ£æ¥è¡¨ä¸çéå¤å¼ï¼å¦ææ°æ®å·²ç»åå¨ï¼ã
ç°ï¼CLUSTER æ示 PostgreSQL ç°ï¼æå®è¡¨ååç´¢å¼åï¼ç´¢å¼å¿
须已ç»è¢«å®ä¹å°è¡¨åãå½ä¸ä¸ªè¡¨è¢«ç°ï¼PostgreSQL è®°å¾å®è¢«ç°å°åªä¸ªç´¢å¼ã CLUSTER å½¢å¼è¡¨åéæ°ç°è¡¨å¨å®ä¹åç°çç¸åç´¢å¼ã
表空é´ï¼å建索å¼ç表空é´ã
4
éå¶ï¼å¦ææ³å建é¨åç´¢å¼ï¼å¨ç¼è¾æ¡è¾å
¥éå¶æ¡ä»¶ãé¨åç´¢å¼æ¯ä¸ä¸ªç´¢å¼å
å«é¡¹ç®ç»ä¸ä¸ªè¡¨çä¸é¨åï¼é常ä¸é¨åå¨ç´¢å¼æ¹é¢è¾è¡¨å
¶ä½é¨åæ´ä¸ºæç¨ã
注éï¼å®ä¹ç´¢å¼ç注éã
æ ä½ç¼è¾å¨ï¼ä»åå表éæ©æ ä½ï¼ä¹å¯ä»¥ä½¿ç¨ç®å¤´æé®æ¥æ¹åç´¢å¼æ ä½ç顺åºã
5
æåºè§åï¼éæ©ç´¢å¼çæåºè§åãæ¯æ PostgreSQL 9.1 æ以ä¸çæ¬ã
æåºé¡ºåºï¼æå®æåºé¡ºåºï¼ASC æ DESCã
Nulls æåºï¼æå® nulls æåºå¨ non-nulls åï¼NULLS FIRSTï¼æåï¼NULLS LASTï¼
温馨提示:答案为网友推荐,仅供参考