简体   繁体   English

PostgreSQL还是MS SQL Server?

[英]PostgreSQL or MS SQL Server?

I'm considering using PostgreSQL with a .Net web app. 我正在考虑将PostgreSQL用于.Net网络应用程序。 Basically 3 reasons: 基本上有三个原因:

  1. Mature Geo Queries 成熟的地理查询
  2. Small footprint + Linux 占地面积小+ Linux
  3. Price 价钱

I'm wondering a bit about tools though, SQL Server Profiler and query plans and performance monitors have been helpful. 我对工具有点疑惑,SQL Server Profiler和查询计划以及性能监视器都很有帮助。 How is this world with Postgres? Postgres这个世界怎么样? Some other things I should consider? 我还应该考虑其他一些事情吗?

Edit: Will most likely use NHibernate as ORM 编辑:最有可能将NHibernate用作ORM

Postgres comes with pgAdmin, which does graphical explains to help you optimise queries. Postgres附带了pgAdmin,它提供图形说明以帮助您优化查询。 Entering your query in an SQL entry pane and pressing F7 gives you a really clear indication of how the query is planned and executed. 在SQL条目窗格中输入查询并按F7可以清楚地指示查询的计划和执行方式。 More on this, here: 更多相关内容,这里:

Graphical Explain Plans . 图形解释计划

If you're doing a web app and are storing or working with IP Addresses, you can use the INET data type, which allows you to store the IP Address as a real type, and do all sorts of operations on it directly - Is an IP address in banned subnet, for example. 如果您正在使用Web应用程序并存储或使用IP地址,您可以使用INET数据类型,它允许您将IP地址存储为真实类型,并直接对其进行各种操作 - 是例如,禁止子网中的IP地址。 No need to store 4 lots of quads and recombine them in code, or store it in a string. 无需存储4批四边形并在代码中重新组合它们,或将其存储在字符串中。

Is running on Linux a bonus, if it's a .NET app? 如果它是.NET应用程序,在Linux上运行是一个奖励吗?

PostgreSQL有很多工具,有些是免费的,有些不是...... PgAdmin + Explain ANALYZE通常会为你提供所需的一切,它是免费的。

I would consider MS SQL because of LINQ to SQL. 因为LINQ to SQL,我会考虑MS SQL。

There is dbLinq which is still in early alpha, but it works for very simple queries. dbLinq仍处于早期alpha状态,但它适用于非常简单的查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM