Subject | RE: [ib-support] Why is SELECT count(*) slower than SELECT * ? |
---|---|
Author | Reggie White |
Post date | 2002-04-07T11:27:28Z |
Without seeing your code, or what you used to get your results (isql, IBO,
IBX, etc.) and not knowing how many records are suppose to be return from
your SQL statement, I doubt that "ALL" of your records from your SQL
statement return in 0.0300 secs, unless it's a very small result set.
Could it be that you are assuming that because you see some records on the
screen, that it has returned the entire result set? Because if you are,
it's a wrong assumption.
Just my 20000 * 10^-6 cents.
-----Original Message-----
From: mircostange [mailto:mirco@...]
Sent: Sunday, April 07, 2002 12:20 AM
To: ib-support@yahoogroups.com
Subject: [ib-support] Why is SELECT count(*) slower than SELECT * ?
Hi all,
I followed the "select count(*) is slow" thread a bit and would like
to add the following side-question to it.
(As posted before) I have an SQL select statement with a number of
joins - pretty complicated - which performs the SELECT * FROM ... in
0.0300 secs. To my surprise, the same statement modified to do a
SELECT count(*) from ... takes more than 5 secs - this is more than
150 times slower!
Does anyone have an explanation for this? For the details of the
query see my previous post with "horrible performance" in it.
Mirco
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
IBX, etc.) and not knowing how many records are suppose to be return from
your SQL statement, I doubt that "ALL" of your records from your SQL
statement return in 0.0300 secs, unless it's a very small result set.
Could it be that you are assuming that because you see some records on the
screen, that it has returned the entire result set? Because if you are,
it's a wrong assumption.
Just my 20000 * 10^-6 cents.
-----Original Message-----
From: mircostange [mailto:mirco@...]
Sent: Sunday, April 07, 2002 12:20 AM
To: ib-support@yahoogroups.com
Subject: [ib-support] Why is SELECT count(*) slower than SELECT * ?
Hi all,
I followed the "select count(*) is slow" thread a bit and would like
to add the following side-question to it.
(As posted before) I have an SQL select statement with a number of
joins - pretty complicated - which performs the SELECT * FROM ... in
0.0300 secs. To my surprise, the same statement modified to do a
SELECT count(*) from ... takes more than 5 secs - this is more than
150 times slower!
Does anyone have an explanation for this? For the details of the
query see my previous post with "horrible performance" in it.
Mirco
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/