Re: [SQL] Query Plan

2007-07-12 Thread Gregory Stark
"Radhika Sambamurti" <[EMAIL PROTECTED]> writes: > When I run the query with combination of FirmClearingID & status the run > times are approx 3700ms. > But when I add tradedate ie date_trunc('day', tradedate) = '20070703' the > run time becomes a horrendous 19631.958 ms. I'm not really able to m

Re: [SQL] Query Plan

2004-09-09 Thread Richard Huxton
Theo Galanakis wrote: Have a question regarding when a Query Plan uses an Index. I have a basic statement This query uses the Index Scan: explain analyse select * from tablea where columna_id < 57 This query uses Seq Scan: explain analyse select * from tablea where columna_id < 58 There are about 5

Re: [SQL] Query plan discrepancies

2004-07-16 Thread Rod Taylor
Have you run ANALYZE recently? Please send back EXPLAIN ANALYZE for the below query. > EXPLAIN from DB 2 (doesn't come back): >QUERY PLAN >