[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Mysql Hack. Anybody think that troubles comes up?
****** message to minivend-users from "Karl M. Joch" <k.joch@kmjeuro.com> ******
I had a big problem with loading our shop. Comsumes amounts of Memory and
was unable to start on the Development System. We have 8 Tables defined for
this Shop. Products has 520.000 entries and the Keyword File more then 1.5
Millions. Now i looked for a way to start faster without loosing performance
and wasting memory.
Mysql has a Limit clause to reduce the query output (eg. 3 here). So I found
in DBI.pm:
sub list_fields {
my($db, $name) = @_;
# DEBUG
#Vend::Util::logDebug
#("DBI list_fields call: @_\n")
# if ::debug(0x4);
# END DEBUG
my @fld;
#### JK 990105 Änderung fuer schnelles Laden mit wenig Memory usage
my $sth = $db->prepare("select * from $name LIMIT 3")
or croak $DBI::errstr;
#### end
# Wish we didn't have to do this, but we cache the columns
$sth->execute or croak "$DBI::errstr\n";
@fld = @{$sth->{NAME}};
croak "DBI: can't find field names.\n"
unless @fld > 1;
I check everything and it works fine at the moment. Anybody thinking that
this doesn´t work on the production machine too, or gives headache later?
Running: Freebsd, MV 3.11 and Mysql 3.21.27 on a P2/350 with 256 MB Ram and
48 GB HD
Many thanks,
Karl
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list