Re: PHP Postgres Async



On Feb 14, 10:32 am, "Steve" <no....@xxxxxxxxxxx> wrote:
"Racter" <bkna...@xxxxxxxxx> wrote in message

news:1171476183.885962.29770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
| So I have an application that does massive result sets, typically 3 to
| 20k rows... someone starts a search, it might take 30-45 seconds
| before the database comes back, then awhile for it to actually pump
| the data across...
|
| Now while someone is doing that, they open up another window to do
| another search at the same time, or even see the main index page,
| which is data driven, and they are blocked... by the pending query.
|
| I'm assuming there is a way to get around this? I tried the
| PGSQL_CONNECT_FORCE_NEW thing, but that dosnt seem to solve the
| blocking problem at all.
|
| Ideas?

it's to do with table locking. you need to specify that a select should not
lock the tables being queries. in addition, your other competing query can
perform a 'dirty read' on the table as well.

btw, if you are returning MINISCULE result sets between 3 and 20K and it's
taking that long for the db to return data, i'd seriously consider rewriting
your query, optimizing your tables, and analyze it's performance...that, or
getting a better db.

I refer to it as huge, because 20,000 records of anything being
displayed on a single web page tends to be a large number. The query
is slow, but thats a legacy schema problem that I cant solve at the
moment. The problem I need to solve is how to get it to treat each
page the way it currently treats each session... if I have IE and
Firefox both open, I can do queries on both... if I have two windows
of firefox open (one session) then I can only do a single query at a
time, it blocks...


.



Relevant Pages

  • Re: Finally which ORM tool?
    ... the session' method. ... they use the same mechanism as Linq to Sql does: ... Also, if you pass a variable to the query, the value the variable ... q is affected if I change foo AFTER this query and BEFORE execution. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Finally which ORM tool?
    ... the session' method. ... able to execute the query by itself. ... has at EXECUTION time is used, ... That SHOULDN'T be important, simply because q LOOKS like a declaration, ...
    (microsoft.public.dotnet.languages.csharp)
  • Best way to integrate classes
    ... Have the Session class extend the DB class? ... MySQL connection via $oDB object further in the code. ... function query { ... // Returns a single record as associative array from query results ...
    (comp.lang.php)
  • Re: Filtering Queries
    ... vs a link to the tblSessionFilter, is my query going to be ... to basically try to create a Session Filter ... filter table and the detail ticket data, ...
    (microsoft.public.access.queries)
  • RE: Touble With Dates
    ... Session altered. ... Every function adds execution cost to your script. ... But who would want to have a query only match a down-to-the-second ... TRUNC will trucate the value to the date only so ...
    (perl.dbi.users)