I have a class of range
public class avl_range
{
public long start { get; set; }
public long end { get; set; }
}
If I use a normal
An Npgsql connection can't be used concurrently - only one command may be running at any given point in time (in other words, no MARS support).
It may definitely make sense to open multiple connections to perform your queries in parallel. Although establishing a new physical connection is expensive, connection pooling is extremely lightweight, so there's very little overhead in reusing physical connections. The main reason not to do this is if you need your multiple operations to be in the same transaction.