Re: Dropping a temporary view?

2024-03-21 Thread Francisco Olarte
On Wed, 20 Mar 2024 at 21:01, Celia McInnis wrote: > Correct. But the initial CREATE VIEW was done as a SELECT from the database, > so if the create view was quick, I thought that the select from the view > would be equally quick. Is this a faulty assumption? It is. Create view does not run

Re: Dropping a temporary view?

2024-03-20 Thread Adrian Klaver
On 3/20/24 13:00, Celia McInnis wrote: On Wed, Mar 20, 2024 at 2:15 PM Adrian Klaver > wrote: __ On 3/20/24 10:54 AM, Celia McInnis wrote: Comments below more to sort out the process in my head then anything else. Hi Adrian The

Re: Dropping a temporary view?

2024-03-20 Thread Celia McInnis
On Wed, Mar 20, 2024 at 2:15 PM Adrian Klaver wrote: > > On 3/20/24 10:54 AM, Celia McInnis wrote: > > Comments below more to sort out the process in my head then anything else. > > Hi Adrian > > The only behaviour changed for the debugging was to make the view > non-temporary, so that I could

Re: Dropping a temporary view?

2024-03-20 Thread Adrian Klaver
On 3/20/24 10:54 AM, Celia McInnis wrote: Comments below more to sort out the process in my head then anything else. Hi Adrian The only behaviour changed for the debugging was to make the view non-temporary, so that I could verify in psql that the content of the view was what I wanted it to

Re: Dropping a temporary view?

2024-03-20 Thread David G. Johnston
Top-posting is frowned upon on these lists. Please try to reply online or at worse after the comments you are referencing. On Wed, Mar 20, 2024, 10:54 Celia McInnis wrote: > > > No, unfortunately I didn't do an explain on the slow query - and it's too > late now since the views are removed.

Re: Dropping a temporary view?

2024-03-20 Thread Celia McInnis
Hi Adrian The only behaviour changed for the debugging was to make the view non-temporary, so that I could verify in psql that the content of the view was what I wanted it to be. Debugging CGI software can be quite difficult, so it's always good to have debugging hooks as a part of the software -

Re: Dropping a temporary view?

2024-03-20 Thread Celia McInnis
Good, that's what I'd hope. I'm still not sure why it took more than 7 minutes in psql to select the old non-temporary view contents after dropping the newer temporary view of the same name. There were no delays in producing the original non-temporary view. If I can reproduce the problem in psql

Re: Dropping a temporary view?

2024-03-20 Thread Adrian Klaver
On 3/20/24 09:51, Celia McInnis wrote: The view is being used in some web query software that multiple people will be accessing and the contents of the view depend on what the person is querying, so I think that temporary views or tables are a good idea. I change to non-temporary views or

Re: Dropping a temporary view?

2024-03-20 Thread Rob Sargent
On 3/20/24 10:51, Celia McInnis wrote: The view is being used in some web query software that multiple people will be accessing and the contents of the view depend on what the person is querying, so I think that temporary views or tables are a good idea. I change to non-temporary views or

Re: Dropping a temporary view?

2024-03-20 Thread Christophe Pettus
> On Mar 20, 2024, at 09:51, Celia McInnis wrote: > > The view is being used in some web query software that multiple people will > be accessing and the contents of the view depend on what the person is > querying, so I think that temporary views or tables are a good idea. There's nothing

Re: Dropping a temporary view?

2024-03-20 Thread Celia McInnis
The view is being used in some web query software that multiple people will be accessing and the contents of the view depend on what the person is querying, so I think that temporary views or tables are a good idea. I change to non-temporary views or tables (in a test version of the software which

Re: Dropping a temporary view?

2024-03-20 Thread David G. Johnston
On Wednesday, March 20, 2024, Celia McInnis wrote: > > > Is there some reason why it then took 7 minutes to select from the > non-temporary view tempview after I dropped the temporary view tempview? > >> >> The fact that you had and then dropped the temporary view has no relationship to how some

Re: Dropping a temporary view?

2024-03-20 Thread Adrian Klaver
On 3/20/24 08:39, Celia McInnis wrote: Ok, thanks - so I guess that means that if there is both a temporary and a non temporary view called "tempvie", DROP VIEW tempview; will remove the 1st tempview found, which with my path is the temporary one. Is there some reason why it then took 7

Re: Dropping a temporary view?

2024-03-20 Thread Celia McInnis
Ok, thanks - so I guess that means that if there is both a temporary and a non temporary view called "tempvie", DROP VIEW tempview; will remove the 1st tempview found, which with my path is the temporary one. Is there some reason why it then took 7 minutes to select from the non-temporary view

Re: Dropping a temporary view?

2024-03-20 Thread Erik Wienhold
On 2024-03-20 15:58 +0100, Celia McInnis wrote: > I am using postresql 16, am trying to use temporary views in a piece of > software that I am writing, and would like it to be able to drop and > recreate temporary views. It seems from the documentation that I can only > use "CREATE OR REPLACE

Dropping a temporary view?

2024-03-20 Thread Celia McInnis
Hi I am using postresql 16, am trying to use temporary views in a piece of software that I am writing, and would like it to be able to drop and recreate temporary views. It seems from the documentation that I can only use "CREATE OR REPLACE TEMPORARY VIEW" if the replacement view has the same