DBD::SQLite and bind?
From: Owen (rcook_at_pcug.org.au)
Date: 12/23/04
- Next message: Tony McCray: "Problems Installing DBD::MySQL"
- Previous message: Michael Peppler: "Re: DBD::Sybase::db do failed: Server message number=2762"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Dec 2004 09:28:50 +1100 To: dbi-users@perl.org
I have a DBD::SQLite program where one of the searches goes through the 10 columns looking for a match. Compared to a single column LIKE search, it's a bit slow
----------------------------------------------
$SQL = "select * FROM oz_boer order by ln";
$cursor = $dbh->prepare($SQL);
$cursor->execute();
while(@rec = $cursor->fetchrow_array){
if($rec[1]=~/$name/io){&print_it(1);next};
.
.
.
if($rec[11]=~/$name/io){&print_it(11);next};
}
--------------------------------------------
Last week there was a message abount bind (Message-ID: <41C57574.1010509@ix.netcom.com>) with references that I followed up but I was unable to see how or if that would be relevant to the above.
So is 'bind' relevant to speeding up the search or is there some other SQL means of doing it
TIA
-- Owen
- Next message: Tony McCray: "Problems Installing DBD::MySQL"
- Previous message: Michael Peppler: "Re: DBD::Sybase::db do failed: Server message number=2762"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|