Re: [PHP] object persistence within a session



On Mon, 2008-11-10 at 14:47 +0000, ceo@xxxxxxxxx wrote:
But joins are what relation databases excel at, so PHP would be the

bottleneck in your example.



Not always...



If your JOIN can not be easily constrained in the query, until some kind of processing of the result set takes place, you can end up with a monster interim result set that will swap the DB server, and send it to its knees.



For example, if you need a result set of 10 items, some of which (but not all) relate to a second table, and the left outer join the generates millions of rows...



Also:



SQL is great at many things.



But something like a tree traversal or other results that depend on the rows returned can be a real bear, especially for pages that are not your core scalable must-have part of the site -- Where you don't want to complicate everything else for just this one admin/report page.



I'm only saying that, on occasion, the dozen DB calls wins out over a JOIN that swaps madly.



Then surely it is still a badly created query? If you're using PHP to
filter the results, even if it's in order to create a second query, your
SQL is not as good as it could be. The only thing that would benefit is
where a query needs information that is only available from outside the
database, which in turn is based on information from a query.


Ash
www.ashleysheridan.co.uk

.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Populating a list -- table structure?
    ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... I have one report complete, ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)
  • Re: Populating a list -- learning Access
    ... It is kinda funny -- I started using databases in the early 80's with dBase and, for years, never knew that I knew SQL! ... If you are on a form or report, the most important property is the NAME, because that is how you refer to it in code. ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)