From: | andy <andy(at)squeakycode(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: php and postgres - too many queries too fast? |
Date: | 2007-11-05 22:29:38 |
Message-ID: | 472F9952.7070600@squeakycode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Hart wrote:
[snip]
> OK, enough of the background, here's my issue. For some lovely reason,
> even though my script reports running an UPDATE query 1563 times (out of
> 1566 rows), only 316 rows have is_ok set to TRUE. I've tried a few
> times, changing this and that, and it always updates those 316 rows (no
> reason for this, the data is actually really good when it comes in, I'm
> just trying to build an extra layer of assuredness). Of particular note,
> I'm trying to keep the script fairly uniform and work for all our
> tables, so the UPDATE statement looks something like
>
> UPDATE table SET is_ok = 'TRUE' WHERE var1 = value1 AND var2 = value2
> AND var3 = value3.....
>
>
> Thomas R. Hart II
> tomhart(at)coopfed(dot)org
Have you run one of these queries via psql or something other than php?
I doubt its a "too many too fast" thing. I'd guess a logic error
someplace.
Why 1563 queries? Can you get the row's modified per query? If you're
tables looks like:
var1 | var2 | var3
--------------------
a | b | a
a | b | c
Would you fire of two query's like:
UPDATE table SET is_ok = 'TRUE' WHERE var1 = 'a' AND var2 = 'b' and var3
= 'a;
UPDATE table SET is_ok = 'TRUE' WHERE var1 = 'a' AND var2 = 'b' and var3
= 'c;
if so, do you generate the update's on the fly?
-Andy
From | Date | Subject | |
---|---|---|---|
Next Message | andy | 2007-11-05 22:32:59 | Re: How to temporarily disable a table's FK constraints? |
Previous Message | Scott Marlowe | 2007-11-05 22:28:01 | Re: php and postgres - too many queries too fast? |