Question: I'm doing massive tests on a Postgres database...

so basically I have 2 table where I inserted 40.000.000 records on, let's say table1 and 80.000.000 on table2

after this I deleted all those records.

Now if I do SELECT \* FROM table1 it takes 199000ms ?

I can't understand what's happening?

can anyone help me on this?

Answer: 
The tuples are logically deleted, not fisically.
You should perform a VACUUM on the db.
[More info here](http://wiki.postgresql.org/wiki/VACUUM_FULL)
If you are deleting all records, use truncate not delete. Further the first time you run it the relation will not be cached (file cache or shared buffers), so it will be slower than subsequent times.