[SQL] Index + View Question

2006-11-03 Thread Dylan Lorimer
Hi,If I've got several tables, each with their own indexes. I also have a view that aggregates several of these tables. My question is, as novice-like as it may sound, do I need to create new indexes on the view or do the indexes from the orig. tables apply somehow when I select data from the view?
Cheers,Dylan


[SQL] Long SQL Update Question

2006-11-03 Thread Dylan Lorimer
So I kicked off a SQL transaction that has been running for 30+
minutes. Is there any way to monitor it to know if it has possibly
hanged or not? To be fair, it is an update on 4+ million rows, so I expect it to run for a bit. But any stats or metrics I can get would be helpful.
Cheers,
dylan



[SQL] Duplicate Fields + Views Questions

2006-11-03 Thread Dylan Lorimer
Hi,I've got 2 views - each with identical column names. I want to create an aggregate view of both tables as a new view. But when I try to do this I understandably get errors on duplicate fields.As an example:
CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view, gnis_usa_view;ERROR:  column "the_geom" duplicatedERROR:  column "the_geom" duplicatedAny ideas on how I can achieve what I am seeking?
Cheers,dylan


Re: [SQL] Duplicate Fields + Views Questions

2006-11-03 Thread Dylan Lorimer
Thanks,Got it working with a UNION.Cheers,dylanOn 11/3/06, Richard Broersma Jr <[EMAIL PROTECTED]
> wrote:> I've got 2 views - each with identical column names. I want to create an
> aggregate view of both tables as a new view. But when I try to do this I> understandably get errors on duplicate fields.>> As an example:>> CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view,
> gnis_usa_view;> ERROR:  column "the_geom" duplicated> ERROR:  column "the_geom" duplicated>> Any ideas on how I can achieve what I am seekingYes but you will have to specify each column name from each table and create aliases for the
duplicated columns.Regards,Richard Broersma Jr.-- E. Dylan Lorimer | Google Earth Enterprise650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F)
Earth Enterprise Support: [EMAIL PROTECTED] | 866.4GO.OGLE ext. 4