Thread: problem with me or postgres ?

problem with me or postgres ?

From
"Fred J"
Date:
Hi,

I'm building a site based on linux/apache/PHP/Postgresql.
(redhat7,apache 1.3/PHP4.04/Postgres 7.1)
I have the following SQL on a  PHP page that processes a rather complex
search form.

SELECT talent.*,models.* FROM talent join models on
(models.usrindx=talent.indx) where validated=1 AND ( (av_runway=true) OR
(av_fashion=true) OR (av_sport=true) OR (av_casual =true) OR (av_print
=true) OR (av_swimwear =true) OR (av_lingerie =true) OR (av_glamour =true)
OR (av_art =true) OR (av_nude =true) OR (av_erotic =true) OR
(av_artisticnude =true) OR (av_acting =true) OR (av_tv =true) OR (av_adult
=true) OR (av_film =true) OR (av_dancer =true) OR (av_stage =true) OR
(av_adv =true) OR (av_livepromo =true)) AND haircolor ='Blond' AND
hairlength ='Waist-length'


I have about 25 records in table talent which has about forty columns
i have 2 records in table models which has maybe 65 columns.

the server will porcess sql without the last two AND clauses (eg without
'AND haircolor ='Blond' AND hairlength ='Waist-length' at the end)

BUT
 pgsql generates a runaway process that loads up the server and fills the
log file as fast as the server will fill it on the above sql.

the log file if filled with blank lines?!
over 4 gig of em in just a few minutes.

any ideas?


I expect the sql to grow by at least another 25 AND clauses. Is this sql too
long?
where would I look for docs specifying the length of an SQL statement?



Thank You
Fred





Re: problem with me or postgres ?

From
Tom Lane
Date:
"Fred J" <fred@arkansaswebs.com> writes:
> I have the following SQL on a  PHP page that processes a rather complex
> search form.

Could we have the table declarations and data that go with that?

            regards, tom lane

Re: problem with me or postgres ?

From
"Fred J"
Date:
well, I upgraded the server from 7.0.2 to 7.1.2  and the problem went away.

Thanks to Tom Lane for the suggestion!
Fred




Fred J <fred@arkansaswebs.com> wrote in message
news:9g18sv$ae8$1@news.tht.net...
> Hi,
>
> I'm building a site based on linux/apache/PHP/Postgresql.
> (redhat7,apache 1.3/PHP4.04/Postgres 7.1)
> I have the following SQL on a  PHP page that processes a rather complex
> search form.
>
> SELECT talent.*,models.* FROM talent join models on
> (models.usrindx=talent.indx) where validated=1 AND ( (av_runway=true) OR
> (av_fashion=true) OR (av_sport=true) OR (av_casual =true) OR (av_print
> =true) OR (av_swimwear =true) OR (av_lingerie =true) OR (av_glamour =true)
> OR (av_art =true) OR (av_nude =true) OR (av_erotic =true) OR
> (av_artisticnude =true) OR (av_acting =true) OR (av_tv =true) OR (av_adult
> =true) OR (av_film =true) OR (av_dancer =true) OR (av_stage =true) OR
> (av_adv =true) OR (av_livepromo =true)) AND haircolor ='Blond' AND
> hairlength ='Waist-length'
>
>
> I have about 25 records in table talent which has about forty columns
> i have 2 records in table models which has maybe 65 columns.
>
> the server will porcess sql without the last two AND clauses (eg without
> 'AND haircolor ='Blond' AND hairlength ='Waist-length' at the end)
>
> BUT
>  pgsql generates a runaway process that loads up the server and fills the
> log file as fast as the server will fill it on the above sql.
>
> the log file if filled with blank lines?!
> over 4 gig of em in just a few minutes.
>
> any ideas?
>
>
> I expect the sql to grow by at least another 25 AND clauses. Is this sql
too
> long?
> where would I look for docs specifying the length of an SQL statement?
>
>
>
> Thank You
> Fred
>
>
>
>