6.0.0-beta1
7/17/25

[#12660] getByModSeq - when start == end, don't query database
Summary getByModSeq - when start == end, don't query database
Queue Horde Framework Packages
Queue Version Git develop
Type Enhancement
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester arjen+horde (at) de-korte (dot) org
Created 09/06/2013 (4332 days ago)
Due
Updated 12/17/2013 (4230 days ago)
Assigned 09/09/2013 (4329 days ago)
Resolved 09/09/2013 (4329 days ago)
Milestone
Patch Yes

History
12/17/2013 11:36:12 AM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 799ee086a976537a7fe03f67395bbbeb2fc7382b
Author: arjen+horde (at) de-korte (dot) org <arjen+horde@de-korte.org>
Date:   Mon Sep 9 09:37:24 2013 -0400

     Bug: 12660 Don't query History when we don't need to.

     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  framework/History/lib/Horde/History.php |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/799ee086a976537a7fe03f67395bbbeb2fc7382b
09/09/2013 01:40:18 PM Michael Rubinsky Comment #3
State ⇒ Resolved
Reply to this comment
Committed, thanks!
09/09/2013 01:39:35 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 52015a5bd6de0c3056f5f5fbf95e7ea6323d6a80
Author: arjen+horde (at) de-korte (dot) org <arjen+horde@de-korte.org>
Date:   Mon Sep 9 09:37:24 2013 -0400

     Bug: 12660 Don't query History when we don't need to.

     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  framework/History/lib/Horde/History.php |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/52015a5bd6de0c3056f5f5fbf95e7ea6323d6a80
09/09/2013 09:45:18 AM Jan Schneider Assigned to Michael Rubinsky
State ⇒ Assigned
 
09/06/2013 12:37:47 PM arjen+horde (at) de-korte (dot) org Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ getByModSeq - when start == end, don't query database
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: History.diff Download
State ⇒ New
Reply to this comment
In the general case where getByModSeq is called with a start == end, 
there is no need to do a query to the database, as the answer (an 
empty array) is already known (when these two are equal, 
history_modseq can never be both > AND <= to this value). Since this 
will be the case most of the time, it is much cheaper to check this 
before doing a database query.

Saved Queries