-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,
I'm running a 7.4.x engine and I'm seeing in a explain analyze:

- ->  Hash  (cost=4.00..4.00 rows=2 width=16) (actual time=30.542..30.542 
rows=0 loops=1)
      ->  Index Scan using user_login_login_key on user_login ul  
(cost=0.00..4.00 rows=2 width=16) (actual time=30.482..30.490 rows=1 loops=1)
            Index Cond: ((login)::text = 'Zoneon'::text)

why postgres perform an extimation of 2 rows knowing that column it's a primary 
key ?

If I do an explain analyze directly on the table I get:

# explain analyze select * from user_login where login = 'Zoneon';
                                                            QUERY PLAN
- 
----------------------------------------------------------------------------------------------------------------------------------
 Index Scan using user_login_login_key on user_login  (cost=0.00..4.00 rows=1 
width=16) (actual time=0.050..0.052 rows=1 loops=1)
   Index Cond: ((login)::text = 'Zoneon'::text)
 Total runtime: 4.627 ms
(3 rows)

btw, is it normal that cast ?



Regards
Gaetano Mendola


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCOXHy7UpzwH2SGd4RAgwAAJ9SMJ3OfYjv03IhhTbJ9GSLby4nfwCg5ezu
UOH8wXRsNAvWRni7GSKlMps=
=6yFm
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to