[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Paul Poulain paul.poul...@biblibre.com changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA
 CC||paul.poul...@biblibre.com

--- Comment #12 from Paul Poulain paul.poul...@biblibre.com ---
QA comment: this patch replaces 30 lines by 3, using an existing function to
avoid duplicaing code

dobrica++ !

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

--- Comment #13 from Paul Poulain paul.poul...@biblibre.com ---
(In reply to comment #10)
 (In reply to comment #6)
  (In reply to comment #5)
  
   LIMIT 1 is not needed since adding framework to WHERE always returns 
   single
   row and it's more correct.
  
  Why more correct ? I don't understand.
  For me, LIMIT 1 should be used if we want only a unique row. I think it can
  increase performance (I agree with you, it is negligible).
 
 Actually a where on an indexed column is a lot faster than using limit,
 explain is a good tool for looking at the query plan to see how mysql is
 optimising the query. There is a whole project of sql optimisation we could
 do by checking some of our more used queries.

Site comment: investigating DBI, we've found that all handlers are
automatically closed when a query has returned all results. If plan not to
fetch all results, then you must explicitely close $sth, or you may have some
useless memory consumption

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Paul Poulain paul.poul...@biblibre.com changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master
Version|master  |rel_3_10

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-06-09 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Chris Cormack ch...@bigballofwax.co.nz changed:

   What|Removed |Added

   Attachment #8923|0   |1
is obsolete||

--- Comment #11 from Chris Cormack ch...@bigballofwax.co.nz ---
Created attachment 9993
  --
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9993action=edit
Bug 7872 - C4::Items::GetItemsInfo should use C4::Koha instead of SQL queries
directly

This simplifies code, and has nice side-effect that memoize of
C4::Koha functions will be more effective.

Signed-off-by: Chris Cormack ch...@bigballofwax.co.nz

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-06-09 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Chris Cormack ch...@bigballofwax.co.nz changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-06-07 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Dobrica Pavlinusic dpav...@rot13.org changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-04-05 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Dobrica Pavlinusic dpav...@rot13.org changed:

   What|Removed |Added

Summary|C4::Items::GetItemsInfo |C4::Items should use
   |should use C4::Koha instead |C4::Koha methods instead of
   |of SQL queries directly |duplicating SQL queries

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 7872] C4::Items should use C4::Koha methods instead of duplicating SQL queries

2012-04-05 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7872

Chris Cormack ch...@bigballofwax.co.nz changed:

   What|Removed |Added

 CC||ch...@bigballofwax.co.nz

--- Comment #10 from Chris Cormack ch...@bigballofwax.co.nz ---
(In reply to comment #6)
 (In reply to comment #5)
 
  LIMIT 1 is not needed since adding framework to WHERE always returns single
  row and it's more correct.
 
 Why more correct ? I don't understand.
 For me, LIMIT 1 should be used if we want only a unique row. I think it can
 increase performance (I agree with you, it is negligible).

Actually a where on an indexed column is a lot faster than using limit, explain
is a good tool for looking at the query plan to see how mysql is optimising the
query. There is a whole project of sql optimisation we could do by checking
some of our more used queries.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/