Foxhound displays the
schema
of SQL Anywhere version 5.5, 6, 7, 8, 9 and 10 databases in a browser
window, plus
Facts & Figures
and
Curiosities.
Schema information is gathered "on-the-fly" each time you pick a database or table to display.
Schema at-a-glance:
Each table is shown as a formatted CREATE TABLE statement, plus CREATE INDEX
statements and ALTER TABLE statements for the foreign keys.
They're all syntactically correct for easy copy and paste.
Follow the foreign keys:
For each table, there are hypertext links to every parent and child.
How much space?
For each table, you see how much disk space is used for data, extension pages,
all the indexes... and for each index too. Bytes per row measurements
include all disk storage so they can be used to extrapolate future requirements.
Find those columns:
All the column names appear in one alphabetic list, with hypertext links into the table definitions.
Plus you can see at a glance where different data types are used for the same column name in different tables.
Facts & Figures:
This section tells you all the names your database goes by: DSN, server, database, machine, plus the connection
string used by dbping. It tells you where all your database files are located, how much free space they
contain, and how badly each file fragmented. Plus, it tells you how big your database is: how many rows,
how many bytes, how many tables, columns, indexes, even how many times each different data type is used.
What's unusual about this database?
If your database is heavily fragmented, or some of your database options have been
changed from the defaults, or you're running with a different page size, you'll see
it at a glance in the "Database Curiosities" section.
What's unusual about this table?
A "curiosity" is an interesting fact; it may or may not be a problem. The Table-level Curiosities section
shows dozens of interesting facts about individual tables; e.g., no primary key, most bytes per row,
large number of secondary indexes, and large amount of index space relative to table space,
Foxhound works with local and network databases, anything that has a working ODBC DSN on your workstation.
The Foxhound application is embedded in a local SQL Anywhere 9.0.2 database.
It uses web services to create the HTML, and an embedded HTTP server to communicate with your browser.
All the User and System Data Sources defined in the registry are listed alphabetically.
User Id: and Password: are optional. Leave them empty to use the values stored in the ODBC DSN.
Firefox Tip: If you have the Firefox "Remember Passwords" feature turned on (Tools - Options - Privacy - Saved Passwords),
you may want to respond "Never for this site" when Firefox asks "Do you want Password Manager to remember this logon?"
Otherwise, an old password may remain in the Password field when you switch between different databases.
To clear a saved password from Firefox, use Tools - Options - Privacy - Passwords - View Saved Passwords - Remove.
Click on Display Schema to display the schema for the database you've chosen.
Use ODBC Administrator to create a new ODBC Data Source or modify an existing one.
ODBC Tip: Performance may be very bad for a database that isn't already running and has both of
the following checked in the ODBC Administrator - Database tab:
Start database automatically
Stop database after last disconnect
The workaround is to un-check Stop database after last disconnect, so the database doesn't stop and
start each time you display a different table.
Check Include system tables if you want to see the schema for all the SQL Anywhere system tables:
SYSTABLE, SYSCOLUMN, etc.
Click on Show all ODBC DSNs to include all the ODBC DSNs in the Choose a DSN:
list regardless of which ODBC driver they specify.
The link will then change
to Only show SQL Anywhere DSNs to indicate that if you click on it again, the Choose a DSN:
list change back to including only those DSNs where the driver names starts with "Adaptive Server Anywhere"
or "Sybase SQL Anywhere".
Click on Stop Foxhound Engine to stop the Foxhound engine.
The engine is implemented as a SQL Anywhere 9
personal server, together with a small local database; it does not appear as an icon in the system tray or task bar.
Your can also use the $stop_foxhound_engine.bat file to stop the engine.
Tip: It's OK to leave the Foxhound engine running all the time, it's got a small footprint.
Or you can stop it if you need the RAM; it will be started again the next time you run one of the $start_*.bat files.
Options displays the SET OPTION PUBLIC.xxx values in the right frame (see below).
Properties
displays the engine and database property values in the right frame (see below).
New Window
opens the Foxhound main menu in a new browser window or tab.
Checkpoint and redisplay
refreshes the current display.
Foxhound issues a CHECKPOINT command to the target database so that it will bring the system tables
up to date; in particular, it will update the column counts. It then refreshes the current display
to show the up to date information.
Show Facts & Figures, Curiosities
Print
will print the left frame.
Show Facts & Figures
displays various facts and figures about the target database (see below).
Show Curiosities
displays various database-level and table-level curiosities (see below).
Click on a table name in the left frame to display the schema in the right frame (see below).
Row counts, space used and bytes per row
are shown for most tables.
The row counts are up-to-date as of the last CHECKPOINT done on the target database.
The space used includes table, extension and index pages including keys.
Bytes per row
can be used to extrapolate disk requirements.
It is calculated as the total disk space used for table, extension and index pages including keys,
divided by the number of rows.
It is only shown for tables that have more than 1 table page, and/or more than 1 extension page.
It is not shown for smaller tables because it's usually not meaningful; i.e., a table with 1 ten-byte
row in a 4K page would show as having 4,096 bytes per row.
This information is up-to-date as of the last CHECKPOINT done on the target database.
The total space for each table is shown in Kilobytes, Megabytes or Gigabytes.
This number is broken down into table page space,
extension page space and index page space; e.g.: 2.5G total = 2.2G table + 83.8M ext + 236M index
The index page space is also shown separately
for each primary key, foreign key, unique constraint and index.
Bytes per row
can be used to extrapolate disk requirements.
It is calculated as the total disk space used for table, extension and index pages including keys,
divided by the number of rows.
It is only shown for tables that have more than 1 table page, and/or more than 1 extension page.
It is not shown for smaller tables because it's usually not meaningful; i.e., a table with 1 ten-byte
row in a 4K page would show as having 4,096 bytes per row.
Click on the Parents
and Children table names to follow the foreign key hierarchy up and down.
Views are displayed as a series of "--" comment lines showing the column names
and data types for the view, as recorded in the SYSCOLUMN system table, followed by the
original source for the view.
A "curiosity" is an interesting fact. It may or may not be a problem; in most cases Foxhound has no way of telling.
This section shows curiosities at the database and server level.
No foreign keys
No transaction log (dbinit -n)
No mirror log (no dbinit -m file)
Blank padding for comparisons (dbinit -b)
Case sensitive comparisons (dbinit -c)
More views than base tables
UNC file specifications are in use
No clustered indexes
No secondary indexes or unique constraints
No explicit PCTFREE settings
Database file version a.b.c.d -- different from engine version a.b.c.d
More than one dbspace nn -- for tables and indexes
Few tables with foreign keys xx% -- 25% or fewer
Many file fragments nn -- 100 or more in database and temporary files
Small maximum cache relative to database size -ch nnK -- nn% of nnK (10% or smaller)
Database page size nK -- different from 4K
Multiprogramming level -gn nn -- different from default 20
Many NULL columns nn% -- 25% or more
Column names with differing data types nn -- see "differs:" in Columns
SET OPTION PUBLIC.xxx = 'yyy' -- different from default 'zzz'
Largest tables ( xx% of the rows and yy% of the total space)...
These tables are selected independently by row count and by total space used to include at least 80% of the rows and 80% of the total space.