Re: SQL Compact Edition - Connection Pool --> Slow!



1 more question regarding this topic.

In fact, I'm writting a library application that will be used internally
within our company. I already expect it to be used by multithreaded
applications.
This was the main reason why I designed it with connection pooling in mind
( --> get a connection, use it and release it as soon as possible [single
call pattern]).

The question I have is related to connection together with multithreading.
In fact, to overcome the speed problem I have, I'm planning to write a kind
of "DataObjectProvider singleton Class" that will hold a set of already
initialized "db Connection".
Whenever needed, clients of this class may ask for an available connection
and when they are done, they can replace it in the pool.

Assuming, my code ensures the connections are really given back to the
singleton class when not needed anymore. Is this design valid?
Does it cause problem if different threads will query for connections (which
were created by a different thread)?

Thanks,
- José

"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxx> a écrit dans le message
de news: uLA9yUjoHHA.4424@xxxxxxxxxxxxxxxxxxxxxxx
Ah, it's not really necessary for the SQLCe engine. While there is (some)
justification for a pool of SQL Server connections (or other big DBMS
systems and JET) that can take some time to get fired up as application
instances come and go in an ASP application, the same cannot be said for a
SQLCe application.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"José Joye" <jose.joye__KILLTHESPAMS__SMAPSEHTLLIK__@xxxxxxxxxx> wrote in
message news:usoC%23uhoHHA.3968@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for your answer.
I guess this is the way to go with compact edition.
Looking more deeply to the MSDN documentation, I found no mention about
the connection pool for Compact Edition 3.1. I just hope it will be on
the feature's list for the next release!

- José


"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxx> a écrit dans le
message de news: %23lrQeYVoHHA.596@xxxxxxxxxxxxxxxxxxxxxxx
I doubt if the SqlCe provider implements a connection pool. I generally
don't close the connection between operations to prevent excessive
compact thrashing etc.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest
book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"José Joye" <jose.joye__KILLTHESPAMS__SMAPSEHTLLIK__@xxxxxxxxxx> wrote
in message news:%23UPQzrPoHHA.4124@xxxxxxxxxxxxxxxxxxxxxxx
I'm currently using the SQL Server Compact Edition 3.1 on my Computer
and I'm facing a speed problem when getting a connection instance back
from the connection Pool. Getting such a connection actually takes ~2
ms.
I'm using the exact same connection string to get the instances from
the connection pool and only have 1 single process accessing the pool.

Is this 2ms time considered as a normal duration to get back from the
connection pool an object that has been place back less than 10s ago?

I'm currently assuming the connection pool is enabled by default and it
is effective if you use the exact same connection string for your
instances.


Thanks,

José









.



Relevant Pages

  • Re: SQL Compact Edition - Connection Pool --> Slow!
    ... You might want to check out my EBook on SQL Server Compact. ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... mind (--> get a connection, use it and release it as soon as possible ...
    (microsoft.public.sqlserver.ce)
  • Re: Db connexion mode ???
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... the Connection pool is not a factor. ...
    (microsoft.public.sqlserver.connect)
  • Re: SQL Compact Edition - Connection Pool --> Slow!
    ... The question I have is related to connection together with multithreading. ... Hitchhiker's Guide to Visual Studio and SQL Server ... I guess this is the way to go with compact edition. ... the connection pool for Compact Edition 3.1. ...
    (microsoft.public.sqlserver.ce)
  • RE: Connection pooling
    ... Connection Pooling with SQL Server 2000 Analysis Services ... the Microsoft XML for Analysis Provider to develop scalable client and Web ... applications for Microsoft SQL Server 2000 Analysis Services. ... Balancing and Shrinking the Connection Pool ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Compact Edition - Connection Pool --> Slow!
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... mind (--> get a connection, use it and release it as soon as possible ... about the connection pool for Compact Edition 3.1. ...
    (microsoft.public.sqlserver.ce)

Loading