Re: How to use index in WHERE int = float - Mailing list pgsql-general

From Andrus
Subject Re: How to use index in WHERE int = float
Date
Msg-id get4eb$15ke$1@news.hub.org
Whole thread Raw
In response to Re: How to use index in WHERE int = float  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
>> explain analyze select * from firma2.dok where  dokumnr='1228137'::float8
>>
>> "Seq Scan on dok  (cost=0.00..187766.23 rows=6255 width=1145) (actual
>> time=43168.460..43176.063 rows=1 loops=1)"
>> "  Filter: ((dokumnr)::double precision = 1228137::double precision)"
>> "Total runtime: 43176.375 ms"
>
> I've just noticed that "actual time" doesn't run from zero; is this part
> of another query, or is something else going on?

Is is standalone query.
This is exact statement executed in PgAdmin window and exact result copied
from pgadmin result windw.

I tried it again and got

"Seq Scan on dok  (cost=0.00..186943.67 rows=5974 width=1173) (actual
time=39275.713..39319.865 rows=1 loops=1)"
"  Filter: ((dokumnr)::double precision = 1228137::double precision)"
"Total runtime: 39320.030 ms"

Andrus.


pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: How to use index in WHERE int = float
Next
From: Sam Mason
Date:
Subject: Re: How to use index in WHERE int = float