> > Is there a way to avoid explicitly specify a table on another database
> >store procedures? My thinking was to use alias or synonym for that
> >particular table. I looked it up in Sybase manuals and I didn't find
> >info. on it. I want to use alias just in case the table is moved to
> >another database or to the same database, therefore, only the change
> >or synonym not the store procedures. Please reply via e-mail or
> >Thanks in advance,
> >Minh Giang
> Sure, Use a sybase view. Say you have database DB1 and database DB2.
> If you've got table tbl1 in DB1 and you want to reference it in DB2
> you can create a view like:
> use DB2
> create view tbl1 as select * from DB1..tbl1
> And the stored procedures can reference the view same way as a table.
> Look up "View" in Sybase manuals.
Ok, I'll give it a shot, but there's a concern with view. Does Sybase10
view uses index? This is a very large table I'm referring to (100+ million
rows). BTW, because of the size of this table, update statistic was never
done on this huge table. Most of my querries are simple query that use
forced index to get Sybase to use the correct index.