Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-17 Thread Cristiano Duarte
Alvaro Herrera wrote: > Cristiano Duarte wrote: > >> SQL table aliases doesn't help locating the real place where the table >> is. If I have a table named "test" at the schema "place" and I do: >> >> "EXPLAIN SELECT * FROM place.test mytest" >> >> I will get: >> >> "Seq Scan on test mytest" >>

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Alvaro Herrera
Cristiano Duarte wrote: > SQL table aliases doesn't help locating the real place where the table is. > If I have a table named "test" at the schema "place" and I do: > > "EXPLAIN SELECT * FROM place.test mytest" > > I will get: > > "Seq Scan on test mytest" > > With this output I know that "my

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Gurjeet Singh
I agree... VERBOSE option can be made parameterised to include additional information in the EXPLAIN's output. I also agree that adding the schema name wouldn't add any overhead, and I support Tom's suggestion: 'Possibly a reasonable compromise would be for EXPLAIN to act like rule reverse-

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Jim C. Nasby
On Tue, May 16, 2006 at 04:36:36PM +0530, Gurjeet Singh wrote: >I don't think adding a schema_name to EXPLAIN's output, is really > a good idea!! The ALIAS feature of the SQL language caters to this > very need of assigning unambiguous names to tables. That's assuming that the query was writt

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Cristiano Duarte
Gurjeet Singh wrote: > I don't think Cristiano is asking for the schema_name in the > EXPLAIN o/p. In fact I'm requesting for schema_name in EXPLAIN o/p. > The request is for the table ALIASes to be shown in the > o/p, which makes more sense than schema_name+table_name, since the > same ta

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Martijn van Oosterhout
On Tue, May 16, 2006 at 04:36:36PM +0530, Gurjeet Singh wrote: >If a big JOIN query takes N minutes on MS SQL Server, and I wish > to see the plan why it is taking that long, one would expect me to > enable 'Show Execution Plan' in the SQL Query Analyzer (similar to > PG's EXPLAIN ANALYZE). An

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Gurjeet Singh
On 5/16/06, Martijn van Oosterhout wrote: On Tue, May 16, 2006 at 09:15:13AM +0530, Gurjeet Singh wrote: As has been pointed out, aliases ave always been displayed. The OPs problem was that he was using schema.tablename everywhere and explain didn't distinguish between schema1.mytable and schema

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Martijn van Oosterhout
On Tue, May 16, 2006 at 09:15:13AM +0530, Gurjeet Singh wrote: >I don't think Cristiano is asking for the schema_name in the > EXPLAIN o/p. The request is for the table ALIASes to be shown in the > o/p, which makes more sense than schema_name+table_name, since the > same table can be used in th

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-15 Thread Tom Lane
"Gurjeet Singh" <[EMAIL PROTECTED]> writes: > I don't think Cristiano is asking for the schema_name in the > EXPLAIN o/p. The request is for the table ALIASes to be shown in the > o/p, which makes more sense than schema_name+table_name, since the > same table can be used in the same query more

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-15 Thread Gurjeet Singh
I don't think Cristiano is asking for the schema_name in the EXPLAIN o/p. The request is for the table ALIASes to be shown in the o/p, which makes more sense than schema_name+table_name, since the same table can be used in the same query more than once. Gurjeet. On 5/15/06, Jim C. Nasby <[EMA

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-15 Thread Jim C. Nasby
Moving to -hackers On Wed, May 10, 2006 at 11:26:30AM -0300, Cristiano Duarte wrote: > > Don't know whether this would help in your situation, but you can make the > > output of EXPLAIN disambiguous by using table aliases: > > > > EXPLAIN > > SELECT * > >FROM schema1.mytable AS mt1, schema2.