Re: [sqlite] Bigger table and query optimization

2008-09-10 Thread Bruno Moreira Guedes
2008/9/9 Igor Tandetnik <[EMAIL PROTECTED]>: > "Stephen Oberholtzer" > <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED] >> Idea: Submit a patch that allows LIKE expressions that start with a >> fixed >> string (i.e. don't start with '%') to use the index to improve >> performance. (S

Re: [sqlite] Bigger table and query optimization

2008-09-10 Thread Stephen Oberholtzer
On Tue, Sep 9, 2008 at 10:18 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > "Stephen Oberholtzer" > <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > > Idea: Submit a patch that allows LIKE expressions that start with a > > fixed > > string (i.e. don't start wit

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Igor Tandetnik
"Stephen Oberholtzer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Idea: Submit a patch that allows LIKE expressions that start with a > fixed > string (i.e. don't start with '%') to use the index to improve > performance. (SQL Server 2000 does this.) http://www.sqlite.org/optover

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Stephen Oberholtzer
On Tue, Sep 9, 2008 at 9:04 AM, Bruno Moreira Guedes <[EMAIL PROTECTED]>wrote: > 2008/9/9 P Kishor <[EMAIL PROTECTED]>: > > On 9/9/08, Bruno Moreira Guedes <[EMAIL PROTECTED]> wrote: > >> Hi people!! > >> > >> I'm getting problems with a bigger table. I'm doing a query like this: > >> > >> SELEC

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Bruno Moreira Guedes
2008/9/9 Igor Tandetnik <[EMAIL PROTECTED]>: > Bruno Moreira Guedes > <[EMAIL PROTECTED]> wrote: >> I can split my 'something' in st0, st1, st2, stN... I have a '.' >> betwen this values. But the number of "st"s is undefined. I tried to >> do "the necessary" number comparsions, appending tokens: >>

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Igor Tandetnik
Bruno Moreira Guedes <[EMAIL PROTECTED]> wrote: > I can split my 'something' in st0, st1, st2, stN... I have a '.' > betwen this values. But the number of "st"s is undefined. I tried to > do "the necessary" number comparsions, appending tokens: > > SELECT fields FROM sometable WHERE field = 'st0.st

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Bruno Moreira Guedes
2008/9/9 Dennis Cote <[EMAIL PROTECTED]>: > Bruno Moreira Guedes wrote: >> >> I can split my 'something' in st0, st1, st2, stN... I have a '.' >> betwen this values. But the number of "st"s is undefined. I tried to >> do "the necessary" number comparsions, appending tokens: >> >> SELECT fields FROM

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Dennis Cote
Bruno Moreira Guedes wrote: > > I can split my 'something' in st0, st1, st2, stN... I have a '.' > betwen this values. But the number of "st"s is undefined. I tried to > do "the necessary" number comparsions, appending tokens: > > SELECT fields FROM sometable WHERE field = 'st0.st1.st2.st3' OR fi

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Bruno Moreira Guedes
2008/9/9 Igor Tandetnik <[EMAIL PROTECTED]>: > "Bruno Moreira Guedes" > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Yes... I need to get the rows where 'something' ENDS wifh >> '.[field-value]'. But I really think this solution isn't very well. > > Can field-value contain a per

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Igor Tandetnik
"Bruno Moreira Guedes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yes... I need to get the rows where 'something' ENDS wifh > '.[field-value]'. But I really think this solution isn't very well. Can field-value contain a period? If not, you can just extract the portion of 'somet

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread Bruno Moreira Guedes
2008/9/9 P Kishor <[EMAIL PROTECTED]>: > On 9/9/08, Bruno Moreira Guedes <[EMAIL PROTECTED]> wrote: >> Hi people!! >> >> I'm getting problems with a bigger table. I'm doing a query like this: >> >> SELECT field FROM tables WHERE '%.' || somefield LIKE 'somestring' > > interesting variation on the

Re: [sqlite] Bigger table and query optimization

2008-09-09 Thread P Kishor
On 9/9/08, Bruno Moreira Guedes <[EMAIL PROTECTED]> wrote: > Hi people!! > > I'm getting problems with a bigger table. I'm doing a query like this: > > SELECT field FROM tables WHERE '%.' || somefield LIKE 'somestring' interesting variation on the syntax. Usually one would WHERE somefield LIKE

[sqlite] Bigger table and query optimization

2008-09-09 Thread Bruno Moreira Guedes
Hi people!! I'm getting problems with a bigger table. I'm doing a query like this: SELECT field FROM tables WHERE '%.' || somefield LIKE 'somestring' The table has about 500.000 registers. When the table is short, it's too fast, but when it's populated it gets slow. I've been imagined it before.