Re: [GENERAL] Differences in identical queries

2007-03-02 Thread Rob Schall
The final answer wound up being ALTER TABLE current ALTER COLUMN orignum SET STATISTICS 100; and then an ANALYZE current; Then the queries started running like a champ (split seconds, not minutes). Thanks Richard! Rob Richard Huxton wrote: > Rob Schall wrote: >> When I reanalyzed the anit

Re: [GENERAL] Differences in identical queries

2007-03-02 Thread Richard Huxton
Rob Schall wrote: I noticed the rows bit. I wasn't quite sure why it thought it would get so many back. Even after doing a analyze. I will alter the table stats and see if that helps. As for the values in orignum, they are all 10 digit numbers (nxx,npa,num). I probably could have stored them as

Re: [GENERAL] Differences in identical queries

2007-03-02 Thread Richard Huxton
Rob Schall wrote: When I reanalyzed the anitmp table with just the 4 entries (2 with istf=true and 2 with istf=false), both queries then ran the same way/time. So it would appear, if you want to do a join or a subselect (IN), then the number of items if will be comparing it to must be less than a

Re: [GENERAL] Differences in identical queries

2007-03-02 Thread Rob Schall
When I reanalyzed the anitmp table with just the 4 entries (2 with istf=true and 2 with istf=false), both queries then ran the same way/time. So it would appear, if you want to do a join or a subselect (IN), then the number of items if will be comparing it to must be less than a certain number. In

Re: [GENERAL] Differences in identical queries

2007-03-01 Thread Richard Huxton
Rob Schall wrote: Question for anyone... I have to queries. One runs in about 2 seconds. The other takes upwards of 2 minutes. I have a temp table that is created with 2 columns. This table is joined with the larger database of call detail records. However, these 2 queries are handled very diffe

[GENERAL] Differences in identical queries

2007-02-28 Thread Rob Schall
Question for anyone... I have to queries. One runs in about 2 seconds. The other takes upwards of 2 minutes. I have a temp table that is created with 2 columns. This table is joined with the larger database of call detail records. However, these 2 queries are handled very differently. The queries