art*_*prs 8 mysql sql postgresql
我曾经用mysql开发一切,本周有机会与postgresql一起工作,为什么不呢!
我总是被告知postgresql有更大的功能集.
我读了一些wiki,但大部分信息都已经过时了.
我失踪的最佳功能是什么?像部分索引等.
另外,我会想念mysql的东西?
Mic*_*uen 18
Postgresql最好的功能之一是表达式索引:http:
//www.postgresql.org/docs/9.0/interactive/indexes-expressional.html
http://www.ienablemuch.com/2010/12/postgresql-speeding -UP-慢coalesce.html
用户定义的聚合:http://developer.postgresql.org/pgdocs/postgres/xaggr.html
http://www.ienablemuch.com/2011/02/how-to-find-second-best-grade-of_06. HTML
CTE,也支持递归http://www.ienablemuch.com/2010/04/simple-hierarchical-query-display.html
generate_series http://www.ienablemuch.com/2010/12/date-functions.html
窗口函数:http://www.ienablemuch.com/2011/01/postgresql-lag-windowing-function.html
精湛的日期功能http://www.ienablemuch.com/2010/12/finding-previous-day-of-week.html
阵列支持:http ://www.ienablemuch.com/2010/12/any-clause-is-superior-to-in-clause-at.html http://www.ienablemuch.com/2010/05/postgresql-用户-都-撒娇,with.html
更丰富的数据类型http://www.ienablemuch.com/2010/05/varchar-ip-address-sorting.html
在对主键进行分组时对主键的功能依赖性(在下一版本,9.1)http://www.ienablemuch.com/2010/08/postgresql-recognizing-functional.html
DISTINCT ON 如何在SQL SERVER 2005中获取给予子节点的父节点
LATERAL JOIN http://www.anicehumble.com/2013/09/sql-server-said-postgresql-said-apply-lateral.html
使用DOMAIN的自定义数据类型:http://www.sqlines.com/postgresql/how-to/create_user_defined_type
并且不要忘记DDL,它也是交易安全的:
BEGIN;
ALTER TABLE foo DROP COLUMN bar;
ALTER TABLE foo ADD COLUMN baz INET;
COMMIT;
Run Code Online (Sandbox Code Playgroud)
非常适合维护工作,即使丢失数据库连接或服务器出现故障,您也始终拥有一致的数据库.
除了迈克尔的名单(我最喜欢窗口功能)
select * from my_func(42)CREATE INDEX idx1 ON some_table (some_column) WHERE some_flag = true)delete from some_table where 42 被视为错误,不会删除整个表| 归档时间: |
|
| 查看次数: |
2249 次 |
| 最近记录: |