Summary | One loop less |
Queue | Ansel |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | duck (at) obala (dot) net |
Created | 02/03/2008 (6313 days ago) |
Due | |
Updated | 02/04/2008 (6312 days ago) |
Assigned | |
Resolved | 02/04/2008 (6312 days ago) |
Milestone | |
Patch | No |
error as DESC and DEFAULT are reserved words.
there isn't a cross-db way to do that, but you can look at Rdo for
examples.
would we need to rename the table columns to do this?
error as DESC and DEFAULT are reserved words.
Thanks. I'm gonna create this as another ticket and do the changes
after every thing else I'm in the middle of settles down...
Thanks again!
would we need to rename the table columns to do this?
error as DESC and DEFAULT are reserved words.
table columns the parameters replace loop could be replace either.
for example the gallery_desc becomes gallers_description and you can
select columns with "AS" sql alias inside select statement.
would we need to rename the table columns to do this?
State ⇒ Resolved
Thanks.
the columns. Is there a performance issue with '*' vs putting all the
column names in the query explicitly?
column list before processing the request.
galleries objects
replacing a for loop for a while loop from what I can tell. Also,
with your change we're no longer catching any errors that the
->fetchAll() (->fetchRow() in your version) call can return.
you fetch the result and create the object in one loop. If you wish,
the row variable can be checked for errors, but is not needed as the
statement is executed and checked before. With a little renaming of
table columns the parameters replace loop could be replace either. for
example the gallery_desc becomes gallers_description and you can
select columns with "AS" sql alias inside select statement. Reducing
the attribute selection only to one loop. Now the are 3, not needed.
the columns. Is there a performance issue with '*' vs putting all the
column names in the query explicitly?
pretty sure this *is* a performance difference, at least on some RDBMs.
State ⇒ Feedback
the columns. Is there a performance issue with '*' vs putting all the
column names in the query explicitly?
replacing a for loop for a while loop from what I can tell. Also, with
your change we're no longer catching any errors that the ->fetchAll()
(->fetchRow() in your version) call can return.
use substr(), is faster
this was not noticed till now I guess that is never recalled so
remove the parameters serialization
rarely need to obtain the count for the same gallery more than once
per page load. Thanks for catching that.
Priority ⇒ 1. Low
State ⇒ New
New Attachment: Ansel.diff
Queue ⇒ Ansel
Summary ⇒ One loop less
Type ⇒ Enhancement
- Combine the fetchAll db driver with the loop that creates galleries objects
- As all fields are prefixed with "gallery_id" don't str_replace but
use substr(), is faster
- countGalleries caches results but never returns it if recalled, as
this was not noticed till now I guess that is never recalled so remove
the parameters serialization