2013/12/11 Jeff Janes
> On Tuesday, December 10, 2013, jacket41142 wrote:
>
>> Thanks very much.
>>
>> I think another problem is that the cost estimation isn't good enough to
>> reflex real cost. Since we can see, from "explain analyze ...",
>>
test, I didn't run something very
different or some heavy program for all queries. And the result seems
consistent.)
Ubuntu 12.04 LTS
I followed the installation step in Quickstart section of
http://wiki.postgresql.org/wiki/Apt
best regards,
jacket41142
筆資料列)
時間: 7063.156 ms
test=> select count(distinct col_int) from t1;
count
---
1025
(1 筆資料列)
時間: 6899.283 ms
I don't think count(*) also uses sort since it should not be needed. But
for the query planner, it seems it can not distinguish between these two
now.
regards,
jacket41142
201
job for entire table of
interested columns, or for each column separately.
regards,
jacket41142
2013/12/11 Jeff Janes
> On Tue, Dec 10, 2013 at 9:28 AM, jacket41142 wrote:
>
>
>>
>> test=> select distinct col_int from t1 group by col_int;
>> Time: 1177.936 ms
>>
test, I didn't run something very
different or some heavy program for all queries. And the result seems
consistent.)
Ubuntu 12.04 LTS
I followed the installation step in Quickstart section of
http://wiki.postgresql.org/wiki/Apt
best regards,
jacket41142