razor - cshtml file and database connection pool for MS SQL Server -
i doing single cshtml page demo purpose. page opens connection backend ms sql database in next way:
var db = database.open("connection_string"); i curious next scenario:
suppose page gets lot of requests. come java world , understand database connection pool can help in performance.
my question: how can set database connection pool in scheme setup (a single cshtml file, iis, ms sql server)?
thanks much info.
regards.
ado.net pools connections automatically. in .net pooling never issue , default on. rare have deal @ all.
if didn't turn off, on , works without noticing difference. can set off in connection string. if yours doesn't pooling, well.
to .net dev unusual java pooling think about. connection overhead multiple of cost of executing inexpensive query. without pooling performance totally destroyed. must have pooling in cases.
sql-server razor database-connection connection-pooling
No comments:
Post a Comment