I just wrote a tiny little script, just using DBI and DBD::SQLite, and
there is no delay.
#!/usr/bin/perl
use strict;
use DBI;
use DBD::SQLite;
my $recipes_sql = q/SELECT * FROM recipe/;
my $dbfile="/home/fiber/data/recipe.db3";
my $dbh = DBI->connect("dbi:SQLite:$dbfile") or croak $DBI::errstr;
my $recipe_ary_ref = $dbh->selectall_arrayref($recipes_sql,{ Slice =>
{} });
foreach my $recipe ( @$recipe_ary_ref ) {
print qq/$recipe->{ID} $recipe->{NAME}\n/;
}
Thanks!!
Alexander Hartmaier wrote, On 2/20/2012 10:02 AM:
Are you sure you measure correctly?
Did you include Perl startup time by accident?
Am 2012-02-20 16:09, schrieb Bill McCormick:
I'm just getting started using DBIx::Class and I am a little surprised
at performance (rather, lack there of).
Perhaps I've missed some key point, index or other such thing, but it
takes well over a second to get results on a single table that has
very few records (<20).
I am running on Debian Squeeze (Linux 2.6.33 i586) with perl (v5.10.1)
and SQLite3 (3.7.3).
If I export DBIC_TRACE=1 and then run the my script, I see this:
SELECT me.ID, me.NAME FROM recipe me:
So then if I run that query in sqlite3, it is markedly faster. I
understand that the DBIx::Class needs a little more time, this delay
makes me think I must have missed something.
Thanks!!
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive:
http://www.grokbase.com/group/[email protected]
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]