Re: [SQL] finding unused indexes?

2007-10-10 Thread Tom Lane
"George Pavlov" <[EMAIL PROTECTED]> writes: > so is it safe to say that an index that has > pg_stat_user_indexes.idx_scan, pg_stat_user_indexes.idx_tup_read, and > pg_stat_user_indexes.idx_tup_fetch all equal to 0 has not been used > (since stats have been reset)? > i have a bunch of those and all

Re: [SQL] finding unused indexes?

2007-10-10 Thread George Pavlov
> From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 10, 2007 6:36 AM > > "George Pavlov" <[EMAIL PROTECTED]> writes: > > so is it safe to say that an index that has > > pg_stat_user_indexes.idx_scan, > > pg_stat_user_indexes.idx_tup_read, and > > pg_stat_user_indexes.idx_tup_fe

Re: [SQL] Computed table name in function

2007-10-10 Thread Scott Marlowe
On 10/10/07, Ray Madigan <[EMAIL PROTECTED]> wrote: > I have a problem that I don't know where to look to understand the problem. > > I have a function that I first select to get a table name followed by > another select into on that table name. If someone could tell me where to > look to solve th

Re: [SQL] Computed table name in function

2007-10-10 Thread Ray Madigan
I thought that the documentation said I couldn't use EXECUTE on a SELECT INTO? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Scott Marlowe Sent: Wednesday, October 10, 2007 11:10 AM To: Ray Madigan Cc: Pgsql-Sql Subject: Re: [SQL] Computed table name in fun

[SQL] Computed table name in function

2007-10-10 Thread Ray Madigan
I have a problem that I don't know where to look to understand the problem. I have a function that I first select to get a table name followed by another select into on that table name. If someone could tell me where to look to solve this problem I would appreciate it. It is something like DECL

Re: [SQL] Computed table name in function

2007-10-10 Thread Daniel Drotos
On Wed, 10 Oct 2007, Ray Madigan wrote: I thought that the documentation said I couldn't use EXECUTE on a SELECT INTO? Try "for record_var in select ..." Look for 36.7.4 Looping Through Query Results in the docs. Daniel ---(end of broadcast)-

Re: [SQL] Computed table name in function

2007-10-10 Thread Richard Huxton
Ray Madigan wrote: I thought that the documentation said I couldn't use EXECUTE on a SELECT INTO? "37.6.5. Executing Dynamic Commands Oftentimes you will want to generate dynamic commands inside your PL/pgSQL functions, that is, commands that will involve different tables or different data typ

[SQL] Refactored queries needing validation of syntactic equivalence

2007-10-10 Thread Mike Adams
Hello! I'm a long time lurker who has become responsible for maintaining / updating utility queries at work. I've reworked two queries (as text attachment as they are wide lines) to enhance the planner's chance of speeding up the queries (Oracle8i's). I'm looking for someone to eyeball them a

[SQL] seg data type

2007-10-10 Thread TJ O'Donnell
I had some questions about the contributed seg data type. My email to [EMAIL PROTECTED], the author, keeps bouncing. I'm guessing he's not at Argonne anymore. Is there someone responsible for the seg data type code? Anyone use it much and care to discuss it with me? Thanks, TJ O'Donnell http://