projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
626e024
)
Merge von 682 aus unstable: sql-performance
author
Stephan Köhler
<s.koehler@linet-services.de>
Mon, 12 Dec 2005 15:55:58 +0000
(15:55 +0000)
committer
Stephan Köhler
<s.koehler@linet-services.de>
Mon, 12 Dec 2005 15:55:58 +0000
(15:55 +0000)
SQL-Query optimiert fuer raussuchen letzer Kunde
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
5fb58af
..
a0fa96a
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-1765,10
+1765,9
@@
sub lastname_used {
$where = "quotation = '1'";
}
- my $query = qq|SELECT id FROM $arap
- WHERE id IN (SELECT MAX(id) FROM $arap
+ my $query = qq|SELECT MAX(id) FROM $arap
WHERE $where
- AND ${table}_id > 0
)
|;
+ AND ${table}_id > 0|;
my $sth = $dbh->prepare($query);
$sth->execute || $self->dberror($query);