Closed yaronn closed 12 years ago
I wouldn't suggest to using one connection, because you can only run one query at the time per connection. This is bad if you want to use node's parallelism. Depending on your use case I would do one of the following:
If you use the express framework, I think it's a good point in using build-in cluster module in node. So then you'll have N workers and each of them will do their own tasks and has its own connection. When one worker in the waiting state and working with vertica connection others can handle new requests and perform them independently.
I updated the README to include some of this info and added some more documentation.
I use node-vertica in an express web app.
Is it better to open one connection per the whole app (e.g. mongo style)? Or open the connection whenever I need it (postgress style)?