JZ wrote:
Quote:
In isql, how do I know the exec time for a given query? (like 'set
timing on' in Oracle) |
set statistics time on
Although this may not give you what you're expecting ... if you want
wall-clock time you'd need to do something like:
select @begin_time = getdate()
exec-some-squery
select @wall_clock_time = datediff(ss,@begin_time,getdate())
Quote:
Also, generally speaking, in Oracle, people create index on different
tablespaces from table tablespace. In Sybase, I guess this should be
the same (for performance purpose). How can I specify a different
database for a primary key at the time when I create table? (one
single SQL) |
In Sybase you'll want to look at creating the index on a different segment
from where the data resides. Just a couple caveats ...
- a clustered index has as leaf pages the actual data pages, ie, the
clustered index and data will always reside on the same segment
- in order to gain the max (performance) benefit of putting indices on
different (from data) segments ... said index segments should reside on
different disk fragments (from data) and said disk fragments should be part
of physically distinct disks
Some info on Sybase 'hierarchy' ...
dataserver - contains many databases; Sybase devices (links to OS raw/file
devices) are created at the dataserver level
database - contained within a dataserver; logical collection of related
data; created from Sybase devices, may use all or part of a device, may
span multiple devices
segment - logical collection of space within a database; all databases are
initially created with 'default', 'system' and 'logsegment' segments; users
can create their own segments; the relationship between segments and the
device fragments that make up a database can be 1:many, many:1 and
many:many.
--
Mark A. Parsons
Iron Horse, Inc.
iron_horse (AT) NOSPAM (DOT) compuserve.com