Re: Large tables, ORDER BY and sequence/index scans

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Milan Zamazal <pdm(at)brailcom(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Large tables, ORDER BY and sequence/index scans
Date: 2010-01-05 16:03:47
Message-ID: 162867791001050803x48dd4488xe89ed0063bc9163a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/1/5 Milan Zamazal <pdm(at)brailcom(dot)org>:
>>>>>> "PS" == Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>
>    PS> Have you original values random_page_cost and seq_page_cost in
>    PS> postgres.conf?
>
> Yes.  To be sure I uncommented the values in postgresql.conf
>
>  seq_page_cost = 1.0                   # measured on an arbitrary scale
>  random_page_cost = 4.0                # same scale as above

and value efective_cache_size ???

what is CREATE INDEX stament for index?

Pavel

>
> and restarted PostgreSQL.  The result looks basically the same:
>
>  explain analyze declare c cursor for select * from foo2 order by value;
>                                                         QUERY PLAN
>  -------------------------------------------------------------------------------------------------------------------------
>   Sort  (cost=1829429.20..1854429.20 rows=9999999 width=10) (actual time=43709.313..49265.244 rows=9999999 loops=1)
>     Sort Key: value
>     Sort Method:  external merge  Disk: 204208kB
>     ->  Seq Scan on foo2  (cost=0.00..154049.99 rows=9999999 width=10) (actual time=0.072..1760.585 rows=9999999 loops=1)
>   Total runtime: 54399.967 ms
>  (5 rows)
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2010-01-05 16:16:44 Re: Using regex to update a table
Previous Message Tom Lane 2010-01-05 15:54:08 Re: FM format modifier does not remove leading zero from year