RE: [sqlite] Any way to do this faster?

2007-03-26 Thread RB Smissaert
Subject: Re: [sqlite] Any way to do this faster? [EMAIL PROTECTED] wrote: > > I will need an index on that field later, but > I could drop it prior to the delete and create > a new one after. > > Don't do that. If you need the index, then leave it as is. > Thinking about it

Re: [sqlite] Any way to do this faster?

2007-03-26 Thread Dennis Cote
[EMAIL PROTECTED] wrote: I will need an index on that field later, but I could drop it prior to the delete and create a new one after. Don't do that. If you need the index, then leave it as is. Thinking about it I am not sure in any case of the value of an index after deletes on a table.

Re: [sqlite] Any way to do this faster?

2007-03-26 Thread Dennis Cote
Brian Johnson wrote: Another way of saying what Dennis said (I had to read his reply twice before I understood it): Point taken. :-) I often think I'm being too wordy in my replies, but when I try to make my statements more succinct they seem to be confusing. I guess I just don't have

Re: [sqlite] Any way to do this faster?

2007-03-26 Thread bartsmissaert
> also, as Dennis said .. unless you have > some other reason for that index on > Table B, get rid of it. I will need an index on that field later, but I could drop it prior to the delete and create a new one after. Thinking about it I am not sure in any case of the value of an index after

Re: [sqlite] Any way to do this faster?

2007-03-26 Thread Brian Johnson
Another way of saying what Dennis said (I had to read his reply twice before I understood it): your query: for every record in TableB it returns ALL the records in tableA and then looks through them Dennis's query: for every record in TableB it checks tableA directly for the existence of that ID

RE: [sqlite] Any way to do this faster?

2007-03-26 Thread bartsmissaert
sage- > From: Dennis Cote [mailto:[EMAIL PROTECTED] > Sent: 26 March 2007 16:12 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Any way to do this faster? > > > RB Smissaert wrote: >> Simplified I have the following situation: >> >> 2 tables, tab

RE: [sqlite] Any way to do this faster?

2007-03-26 Thread Arora, Ajay
To: sqlite-users@sqlite.org Subject: Re: [sqlite] Any way to do this faster? RB Smissaert wrote: > Simplified I have the following situation: > > 2 tables, tableA and tableB both with an integer field, called ID, holding > unique integer numbers in tableA and non-unique integer numbe

Re: [sqlite] Any way to do this faster?

2007-03-26 Thread bartsmissaert
Thanks Dennis, will try that when I get chance (at work now) and will report back about the difference it made. RBS > RB Smissaert wrote: >> Simplified I have the following situation: >> >> 2 tables, tableA and tableB both with an integer field, called ID, >> holding >> unique integer numbers in

Re: [sqlite] Any way to do this faster?

2007-03-26 Thread Dennis Cote
RB Smissaert wrote: Simplified I have the following situation: 2 tables, tableA and tableB both with an integer field, called ID, holding unique integer numbers in tableA and non-unique integer numbers in tableB. Both tables have an index on this field and for tableA this is an INTEGER PRIMARY