Skip to main content
Participating Frequently
March 1, 2009
Question

Simple Select Query Taking 5-10s

  • March 1, 2009
  • 4 replies
  • 1199 views
We have a web server on the same lan as the DB server.

A simple select * from tablename (~100 entries) is taking anywhere from 30ms to 10 seconds lan. ASP code on the web server provides instant (30ms) queries. Ping is never <1ms. If I point to a remote DB server, the same query is never more than 300ms (which is great for over the internet).

I enabled logging in CFAdmin -> Datasources and shortly after my select * from tablename I see this:

spy(2009/02/28 16:39:00.539)>> Connection[2].setReadOnly(boolean readOnly)
spy(2009/02/28 16:39:00.539)>> readOnly = false
spy(2009/02/28 16:39:00.539)>> OK
spy(2009/02/28 16:39:05.726)>> OK (true)

We need to get this up and running ASAP. Please help!!
This topic has been closed for replies.

4 replies

sebumdAuthor
Participating Frequently
March 1, 2009
> - What's the schema of the table you're querying
> - Is there any difference if you specify the columns you
> actually need, rather than using SELECT *


This happens with any table, so I'm not sure it matters?
And no, no difference if I specify a specific column, etc Ideas?. Ideas?
Inspiring
March 1, 2009
> - What's the schema of the table you're querying
> - Is there any difference if you specify the columns you
> actually need, rather than using SELECT *

What about answers to the last two questions?
Inspiring
March 1, 2009
Some more info might make it possible to answer this:
- What database are you connecting to
- Which driver are you using
- What's the schema of the table you're querying
- Is there any difference if you specify the columns you actually need,
rather than using SELECT *

--
Adam
sebumdAuthor
Participating Frequently
March 1, 2009
I'm connecting to SQL Server 2000 on a Win2k3 box.
The default CF8 Installation.
Every table this happens for.
Select * is needed, because we have existing sites we are migrating a lot of which use select *.

Inspiring
March 1, 2009
Just might be a driver issue.
sebumdAuthor
Participating Frequently
March 1, 2009
JDBC Driver you think?