Weigert, Thomas wrote:
RAS, You don't have the latest versions you are grepping I think.
yes absolutely the case -- some of the changes you've made have been viewed by me to be unwise or maybe simply unnecessary so i'm still operating on a baseline about 3 months old.
Yes, of course, disconnect closes the connection. Currently there are several open and close; this is what I meant by "opening and closing multiple times". It would have been nice to keep the db stuff out of the scripts, but I guess it can't be avoided... I'll move the db open/close back into the scripts. Th.-----Original Message----- From: Robert A. Schmied [mailto:ras
AT acm.org]
Sent: Saturday, May 03, 2008 11:07 AM To: devel
AT geniustrader.org
Subject: Re: [GT] trunk/GT/Tools.pm 2008-03-30 04:07:51 UTC (rev 594) or later Weigert, Thomas wrote:I am not sure why this disconnect causes problems, as at the end oftheroutine find_calculator the access to the data base is completed. However, if that remains an issue, we have to take the connect and disconnect from the data base out of the find_calculator routineandmove it to be beginning and end of the scripts, respectively.seems to me the every script already has a my $db = create_db_object() statement to make the connection. ras [ 15686 ] % ggrep -r 'my $db' *.pl furthermore i don't think connections and disconnections stack, either at the gt level or at the db server level, any disconnect closes them all. at least that's the way i see it. rasThat might improve data base performance for the scripts hitting thedbmultiple times, such as backtest_multi and backtest_many, as well as scan. Th.-----Original Message----- From: Robert A. Schmied [mailto:ras
AT acm.org]
Sent: Tuesday, April 29, 2008 2:46 PM To: devel
AT geniustrader.org
Subject: [GT] trunk/GT/Tools.pm 2008-03-30 04:07:51 UTC (rev 594) or later gt'ers if you are using a sql database, such as postgresql or mysql, andhaveupgradedfrom the gt svn repository you need to make the following change toGT/Tools.pm if the revision is between 594 and around 622 or so. in sub find_calculator comment out the line "$db->disconnect;" asshownbelow: die($msg); } my $db = GT::Eval::create_db_object(); my ($prices, $calc) = get_timeframe_data($code, $timeframe, $db, $max_loaded_items); # $db->disconnect; my $c = $prices->count; my $first; ras