From: | Renaud Tthonnart <thonnart(at)amwdb(dot)u-strasbg(dot)fr> |
---|---|
To: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Query with multiples operators BETWEEN |
Date: | 2001-02-22 16:45:17 |
Message-ID: | 3A95421D.98684B1A@amwdb.u-strasbg.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Here they are :
EXPLAIN
(SELECT e.name
FROM Observation o, Exposure_EPIC e
WHERE o.numObs = e.obs
AND e.instrPN IS NOT NULL
AND o.RA BETWEEN 3 AND 5);
NOTICE: QUERY PLAN:
Hash Join (cost=25.02..60.98 rows=33 width=20)
-> Seq Scan on exposure_epic e (cost=0.00..22.50 rows=333 width=16)
-> Hash (cost=25.00..25.00 rows=10 width=4)
-> Seq Scan on observation o (cost=0.00..25.00 rows=10
width=4)
EXPLAIN
----------------------------------------------------
EXPLAIN
(SELECT e.name
FROM Observation o, Exposure_EPIC e
WHERE o.numObs = e.obs
AND e.instrPN IS NOT NULL
AND o.DE BETWEEN 2 AND 7);
NOTICE: QUERY PLAN:
Hash Join (cost=25.02..60.98 rows=33 width=20)
-> Seq Scan on exposure_epic e (cost=0.00..22.50 rows=333 width=16)
-> Hash (cost=25.00..25.00 rows=10 width=4)
-> Seq Scan on observation o (cost=0.00..25.00 rows=10
width=4)
EXPLAIN
---------------------------------------------------
EXPLAIN
(SELECT e.name
FROM Observation o, Exposure_EPIC e
WHERE o.numObs = e.obs
AND e.instrPN IS NOT NULL
AND o.RA BETWEEN 3 AND 5
AND o.DE BETWEEN 2 AND 7);
NOTICE: QUERY PLAN:
Nested Loop (cost=0.00..56.67 rows=3 width=20)
-> Seq Scan on observation o (cost=0.00..30.00 rows=1 width=4)
-> Seq Scan on exposure_epic e (cost=0.00..22.50 rows=333 width=16)
EXPLAIN
--------------------------------------------------
Table Observation has 5000 rows and 10 columns
Table Exposure_Epic has 45000 rows and 6 columns
I haven't create any index
If use ---> >2 and <7 , this is the same result.
Thank you for your help
Renaud THONNART
From | Date | Subject | |
---|---|---|---|
Next Message | Peter T Mount | 2001-02-22 16:47:00 | Re: Errors in other languages |
Previous Message | Kajetan Kazimierczak | 2001-02-22 16:44:56 | Re: Re: what means "INSERT xxx yyy" ? |