Search Postgresql Archives

Re: getting the ranks out of items with SHARED

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

 



Janning Vygen <vygen@xxxxxx> writes:
> this way it works:

> CREATE TEMP TABLE ranking AS *Q*;
> EXECUTE 'UPDATE temp_gc SET gc_rank = ranking.rank 
> FROM ranking WHERE temp_gc.mg_name = ranking.mg_name;';

> and this way it doesn't:

> UPDATE temp_gc
> SET gc_rank = ranking.rank
> FROM (*Q*)
> ranking
> WHERE temp_gc.mg_name = ranking.mg_name;

It's difficult to be sure without looking at EXPLAIN output, but I would
guess that the second query is being done with a plan that involves
multiple scans of "*Q*", and that's confusing your function.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[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