跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] postgresql 分区表 主键索引问题

发表于

pg 分区表如果不设主键,而设置唯一索引,会对性能有什么影响吗, 主要是递增序列 id 字段很多时候都不在分区字段里,这种情况应该怎么处理比较好.

比如有一个用户道具分区表, 有字段 id, user_id, item_id, amount. 通过 user_id 来分区,这种情况怎么建立索引好. 是建立 user_id,item_id 的复合主键,还是唯一索引, id 递增序列该怎么处理. 主要查询是通过 user_id 查列表或某个道具

大神们一般是怎么做的,求指教.第一次用 pg,之前都是 mysql,有些地方不太懂

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.