Re: Issue with prepared statement

2010-06-07 Thread Lethal Possum
On Jun 6, 8:46 pm, listm...@triad.rr.com (listmail) wrote: > Lethal Possum wrote: > > On Jun 5, 6:52 pm, listm...@triad.rr.com (listmail) wrote: > > >> Lethal Possum wrote: > > >>> Hello, > > >>> I am trying to create a prepared statement for the following query in > >>> MySQL: > > >>> INSERT IGNOR

RE: Issue with prepared statement

2010-06-06 Thread Martin Gainty
né que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > To: dbi-users@perl.org > From: lethal.pos...@gmail.com > Subject: Re: Issue with prepared statement > Date: Sat, 5 Jun 2010 11:32:55 -0700 >

Re: Issue with prepared statement

2010-06-06 Thread listmail
Lethal Possum wrote: On Jun 5, 6:52 pm, listm...@triad.rr.com (listmail) wrote: Lethal Possum wrote: Hello, I am trying to create a prepared statement for the following query in MySQL: INSERT IGNORE INTO foo (group, value) (SELECT 101, value FROM bar WHERE value LIKE '%s

Re: Issue with prepared statement

2010-06-06 Thread Lethal Possum
On Jun 5, 6:52 pm, listm...@triad.rr.com (listmail) wrote: > Lethal Possum wrote: > > Hello, > > > I am trying to create a prepared statement for the following query in > > MySQL: > > > INSERT IGNORE INTO foo (group, value) (SELECT 101, value FROM bar > > WHERE value LIKE '%something%'); > > > So f

Re: Issue with prepared statement

2010-06-06 Thread Lethal Possum
On Jun 5, 2:57 pm, ashish.mukher...@gmail.com (Ashish Mukherjee) wrote: > Hello, > > Generally, there is no gain to using bind parameters if you don't know the > columns to be projected in advance in SELECT and your LIKE regex is also > dynamic. It can't prepare a query execution plan and cache it

Re: Issue with prepared statement

2010-06-06 Thread Lethal Possum
On Jun 5, 6:52 pm, listm...@triad.rr.com (listmail) wrote: > Lethal Possum wrote: > > Hello, > > > I am trying to create a prepared statement for the following query in > > MySQL: > > > INSERT IGNORE INTO foo (group, value) (SELECT 101, value FROM bar > > WHERE value LIKE '%something%'); > > > So f

Re: Issue with prepared statement

2010-06-05 Thread listmail
Lethal Possum wrote: Hello, I am trying to create a prepared statement for the following query in MySQL: INSERT IGNORE INTO foo (group, value) (SELECT 101, value FROM bar WHERE value LIKE '%something%'); So far my Perl code looks something like this: my $group = 101; my $pattern = '%something

Re: Issue with prepared statement

2010-06-05 Thread Ashish Mukherjee
Hello, Generally, there is no gain to using bind parameters if you don't know the columns to be projected in advance in SELECT and your LIKE regex is also dynamic. It can't prepare a query execution plan and cache it for later use, since the basic constructs of your query keep changing. I am not