Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 查询postgres节点js的最佳选项是什么?_Node.js_Postgresql_Orm_Microservices_Database Performance - Fatal编程技术网

Node.js 查询postgres节点js的最佳选项是什么?

Node.js 查询postgres节点js的最佳选项是什么?,node.js,postgresql,orm,microservices,database-performance,Node.js,Postgresql,Orm,Microservices,Database Performance,我想用node js和postgres为数百万用户提供可扩展的微服务,我想知道哪一个是最好的 使用orm或postgres存储函数使用db进行查询的方法?最好的方法是一种模糊的问题 如果你只想访问Postgres,你可以使用一个类似的包 如果你想在你的查询中有更多的灵活性,我建议。这是编写一些查询的有趣方式 存储过程可能是“快速”的,或者您希望它是什么,但是如果您不知道微服务的域,那么您将花费大量时间更新该存储过程,而您的nodejs包也不会那么重要 这里有很多未知数,但我建议只使用knex(或

我想用node js和postgres为数百万用户提供可扩展的微服务,我想知道哪一个是最好的 使用orm或postgres存储函数使用db进行查询的方法?

最好的方法是一种模糊的问题

如果你只想访问Postgres,你可以使用一个类似的包

如果你想在你的查询中有更多的灵活性,我建议。这是编写一些查询的有趣方式

存储过程可能是“快速”的,或者您希望它是什么,但是如果您不知道微服务的域,那么您将花费大量时间更新该存储过程,而您的nodejs包也不会那么重要

这里有很多未知数,但我建议只使用knex(或ORM,如果这种建模对您有帮助的话),直到您接触到数百万用户,然后看看使用存储功能优化您的微服务是否是当时的正确方向。到那时,您可能还有一些其他问题:)