DBD::SQLite and bind?

From: Owen (rcook_at_pcug.org.au)
Date: 12/23/04


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


Relevant Pages

  • Re: Changing color of a column in a datagrid.
    ... I would use the property builder of the data grid ... but how do I do it for a single column? ... TIA - Jeff. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Changing color of a column in a datagrid.
    ... How can you change the background color for a single column in a datagrid. ... TIA - Jeff. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: SQL*PLUS select statment
    ... single column; Here is an example: ... I know this has to be possible, but I lack the SQL skill to get to ... Puget Sound Oracle Users Groupwww.psoug.org ... From what I gather on DECODE its an if/than/else ...
    (comp.databases.oracle.misc)
  • Re: From BAD To WORSE: A Disasterous Delete
    ... > DOES SQL 2000 DELETE ALL RECORDS WHEN THE DATA TYPE OF A SINGLE COLUMN IS ... Tibor Karaszi, SQL Server MVP ... > mysterious deletion of ALL RECORDS, but now with the smaller data extract. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL*PLUS select statment
    ... single column; Here is an example: ... I know this has to be possible, but I lack the SQL skill to get to ... This relies as well to all other reserved words, which can be looked up in oracle documentation or in v$reserved_words. ... Another bad habit is to store dates as character strings. ...
    (comp.databases.oracle.misc)