Re: any way to use indexscan to get last X values

From: Tomaz Borstnar <tomaz(dot)borstnar(at)over(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: any way to use indexscan to get last X values
Date: 2003-06-16 07:08:49
Message-ID: 5.2.1.1.0.20030616090124.02a85678@127.0.0.1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

At 08:15 16.6.2003, Shridhar Daithankar wrote:
> > Total runtime: 50.20 msec
> > Used to be between 5800 and 6741 msec before this patch!
>
>Good that the patch works for you. But as I see there is an improvement in
>plan. Not nitpicking but what does actual performance difference between
>system
>before patch and after patch?

A lot since this is query to get list of last active threads sorted by last
modified date. With times less than 300ms you mostly do not notice slower
query as there could be other factors to affect the speed like network
delays and such. But people on fast links will notice that it takes a bit
long to display list of threads - especially when the system is using PHP
accelerator and compression.

So this really means major increase of performance for real situation -
forum with over 85 000 messages where you get rid of full scan and 2 full
sorts to display list of msgs which happens a lot. You can always use some
query/page caching things, but then people start to post duplicates,
because they think the message did not make it into the database.

Tomaz

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shridhar Daithankar 2003-06-16 07:22:00 Re: any way to use indexscan to get last X values
Previous Message siaco 2003-06-16 06:38:50 Re: 7.3 vs 7.2 - different query plan, bad performance