469,917 Members | 1,631 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

What makes database connection expensive?

We all seem to know that database connections are expensive and we try
to reduce the number of database trips as much as possible.

This may sound like a stupid question: What makes a database
connection expensive? Is it memory intensive? CPU-intensive? Or does
it use a lot of bandwidth? Or none of these?

Thanks.
Jan 30 '08 #1
4 1909
Creating the connection - opening the socket and preparing datastructures -
seems to be where the expense is located relative to the speed of querying
that is.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------

"gnewsgroup" <gn********@gmail.comwrote in message
news:9b**********************************@e25g2000 prg.googlegroups.com...
We all seem to know that database connections are expensive and we try
to reduce the number of database trips as much as possible.

This may sound like a stupid question: What makes a database
connection expensive? Is it memory intensive? CPU-intensive? Or does
it use a lot of bandwidth? Or none of these?

Thanks.
Jan 30 '08 #2
On Jan 30, 12:06*pm, "Alvin Bruney [ASP.NET MVP]" <www.lulu.com/owc>
wrote:
Creating the connection - opening the socket and preparing datastructures -
seems to be where the expense is located relative to the speed of querying
that is.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------
Thank you very much.
Jan 30 '08 #3
Yes I agree with Alvin and I'd also like to highlight that there are
typically a limited number of simultaneous connections permitted to the
database. So while creating and destroying database connections can be
expensive, keeping them open while they're not being used can also be
expensive.
This is why the built-in connection pooling feature of ADO.NET is so nice
even though it may not be perfectly optimal in all situations.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net
"gnewsgroup" <gn********@gmail.comwrote in message
news:9b**********************************@e25g2000 prg.googlegroups.com...
We all seem to know that database connections are expensive and we try
to reduce the number of database trips as much as possible.

This may sound like a stupid question: What makes a database
connection expensive? Is it memory intensive? CPU-intensive? Or does
it use a lot of bandwidth? Or none of these?

Thanks.
Jan 30 '08 #4
To be fair, ADO has been pooling connections long before ado.net :)

"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <St***@Orr.netwrote in
message news:8C**********************************@microsof t.com...
Yes I agree with Alvin and I'd also like to highlight that there are
typically a limited number of simultaneous connections permitted to the
database. So while creating and destroying database connections can be
expensive, keeping them open while they're not being used can also be
expensive.
This is why the built-in connection pooling feature of ADO.NET is so nice
even though it may not be perfectly optimal in all situations.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net
"gnewsgroup" <gn********@gmail.comwrote in message
news:9b**********************************@e25g2000 prg.googlegroups.com...
>We all seem to know that database connections are expensive and we try
to reduce the number of database trips as much as possible.

This may sound like a stupid question: What makes a database
connection expensive? Is it memory intensive? CPU-intensive? Or does
it use a lot of bandwidth? Or none of these?

Thanks.


Jan 31 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Keith Smith | last post: by
39 posts views Thread by windandwaves | last post: by
11 posts views Thread by Paul Brady | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.