Search Postgresql Archives

Re: Inherits and "get highest id".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 10, 2005 at 12:27:32 +0200,
  Dawid Kuroczko <qnex42@xxxxxxxxx> wrote:
> 
> In other words -- doing such a one row select means scanning the
> whole partitioned data.  the primaryindex on logid is not used
> anywhere.  Creating view (SELECT * UNION ALL SELECT * UNION ALL....)
> does not help either.
> 
> I wonder -- is there any better solution?  selecting highest from each
> table, unioning it and then selecting highest of the highest works
> well but it strikes me as 'not exactly the niciest implementation'
> (one of the reasons is that I have to remembed about it each time
> new table will be added to schema...).
> 
> Any comments, hints?

I seem to remember people getting performance by doing union alls of selects
that explicity list the partition condition; as that will let the planner
speed up checks of tables that cannot result in matches.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux