I just tried this (based on an earlier suggestion by Stephen/Lincoln)... and
it shaved 1-2 seconds off the time.  I was at 4 seconds, but now still
taking 2-3 seconds.

This is LIGHTNING fast on a field with only a few hundred characters.

This is screaming driver problem to me.

-----Original Message-----
From: Jim Campbell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 10:54 AM
To: CF-Talk
Subject: Re: PostgreSQL Sloooooow!


Jillian -

You need a join on your table:

SELECT *
FROM
    content, publications
WHERE
    content.id = 974 AND
    content.id = publications.id

That will keep the query from retrieving far more data than you actually
need

- Jim

----- Original Message -----
From: "Jillian Carroll" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 10:00 AM
Subject: PostgreSQL Sloooooow!


> Hey everybody!
>
> I'm working on a site that is selecting a field with a large size... and
it
> can take on the order of 3-4 seconds whereas the same query executed from
> psql
> will take under a half a second.
>
> The query I'm testing with has a text field of size 20466.
>
> I am running PostgreSQL 7.2 with the latest Unix ODBC driver on Red Hat
7.2.
>
> This is the query:
>
> <cfoutput>
>
> <!-- #Now()# -->
>
> <cfquery name="q" datasource="epi">
>   SELECT *
>   FROM
>     content, publications
>   WHERE
>     content.id = 974 AND
>     publications.id = 974
> </cfquery>
>
> <!-- #Now()# -->
> </cfoutput>
>
> There are approximately 1200 records in each table.
>
> Anybody have any suggestions? Thanks!!
>
> --
> Jillian Carroll
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to