Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1

От: Tomas Tamosaitis
Тема: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1
Дата: ,
Msg-id: 1188219449.8210.4.camel@localhost.localdomain
(см: обсуждение, исходный текст)
Ответ на: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Anton)
Список: pgsql-performance

Скрыть дерево обсуждения

partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Anton, )
 Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  ("Mikko Partio", )
  Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Anton, )
   Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  ("Heikki Linnakangas", )
    Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  ("Luke Lonergan", )
    Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  ("Luke Lonergan", )
     Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  ("Heikki Linnakangas", )
      Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Bruce Momjian, )
     Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Anton, )
      Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Tom Lane, )
       Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Anton, )
        Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Heikki Linnakangas, )
 Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1  (Tomas Tamosaitis, )

Pn, 2007 08 24 14:53 +0600, Anton rašė:
> Hi.
>
> I just created partitioned table, n_traf, sliced by month
> (n_traf_y2007m01, n_traf_y2007m02... and so on, see below). They are
> indexed by 'date_time' column.
> Then I populate it (last value have date 2007-08-...) and do VACUUM
> ANALYZE ON n_traf_y2007... all of it.
>
> Now I try to select latest value (ORDER BY date_time LIMIT 1), but
> Postgres produced the ugly plan:
>
> =# explain SELECT * FROM n_traf ORDER BY date_time DESC LIMIT 1;
>                                                QUERY PL

can you test performance and send explain results of select like this :
select * from n_traf where date_time = (select max(date_time) from
n_traf);

i have similar problem with ~70M rows table (then using ordering), but
my table not partitioned.
I`m interesting how this select will works on partitioned table.


--
Pagarbiai,
Tomas Tamošaitis
Projektų Vadovas
Connecty
Skype://mazgis1009?add
Mob: +370 652 86127
e-pastas: 
web: www.connecty.lt



В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: Performance issue
От: Decibel!
Дата:
Сообщение: Re: asynchronous commit feature