Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Concatenation slows query
Fri, Nov 13 2009 3:07 PMPermanent Link

adam
I have a simple query on a db with c200k records in members and c80k records in People:

SELECT
 FirstName + ' ' + LastName + ' ' + KKIDNum as Name,
 ID
FROM
People P

WHERE ID IN
(
SELECT PeopleID
FROM
MembershipDetails
WHERE Current = true
and SocietiesID = 1928
)
ORDER BY Name

In this form it takes about 6.5 sec to run.

If I write it without the concatenation it runs in 2.2 secs.

I need to run the Concat version, is there a way to make it closer in speed to the faster
version??
Mon, Nov 16 2009 3:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< In this form it takes about 6.5 sec to run.

If I write it without the concatenation it runs in 2.2 secs.

I need to run the Concat version, is there a way to make it closer in speed
to the faster version?? >>

What does the non-concatenated version look like ?  The concatenation may
take a while, depending upon the number of records returned.  How many
records are in the result set ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Image