eXtremeDB xsql usage(1)



XSQL is a simple command-line driven interactive SQL utility you can use to test SQL
statements without having to write an eXtremeSQL program first, and to experiment with
different ways of expressing the query to influence the rule-based optimizer and then view the
effect on the chosen execution plan and repeat as necessary until the desired execution plan is
generated.
The format of the XSQL command line is:
XSQL DATABASE_NAME {SQL_FILE}
The database must already exist in shared memory in which case XSQL can open and connect to
it. So, one way of using XSQL is to write a program to populate a database, and then cause the
program to wait on keyboard input. Meanwhile, invoke XSQL and experiment with different
query formulations.
Alternatively, you can use XSQL to populate the database by creating a SQL_FILE, a text file
containing SQL statements, and include as many SQL INSERT statements as are needed. Note
that you can use XSQL to save a database that can be loaded in a later session, which may be
faster than re-executing many SQL statements to create an initial state for testing.
COMMAND  DESCRIPTION
help  Displays this list of commands
exit  Ends the XSQL session
trace <on|off>  Causes XSQL to display the query execution plan
format <HTML|XML|TEXT>  Select the query output format of XSQL
Report  Generates a report of database statistics (see example
below)
save <file>  Equivalent to the mc_db_save() function, it save a
copy of the in-memory database to the specified file.
<statement>  Any valid eXtremeSQL statement (i.e., SELECT,
UPDATE, INSERT, DELETE)
Example of Report Output
Database size 15976Kb
Hash Index (Album.by_seq): 300 objects, 6Kb
Tree Index (Album.by_name): 300 objects, 6Kb, height=3
Tree Index (Album.by_artist): 300 objects, 6Kb, height=3
Hash Index (Artist.by_seq): 100 objects, 2Kb
Tree Index (Artist.by_name): 100 objects, 2Kb, height=2
Hash Index (Genre.by_seq): 0 objects, 0Kb
Tree Index (Genre.by_name): 0 objects, 0Kb
Tree Index (Playlist.by_name): 0 objects, 0Kb
Hash Index (Playlist.by_nbr): 0 objects, 0Kb
eXtremeSQL User Guide version 4.5    page 75
Hash Index (Track.by_seq): 3000 objects, 69Kb
Tree Index (Track.by_name): 3000 objects, 62Kb, height=4
Tree Index (Track.by_album): 3000 objects, 62Kb, height=4
List (counter.list_index_): 1 objects, 0Kb
Tree Index (track_playlist.by_track): 0 objects, 0Kb
Tree Index (track_playlist.by_playlist): 0 objects, 0Kb
Database Instance (): 0 objects, 1020Kb
The subdirectory “xsql/scripts” provides a group of script files (with extension “.sql”) that
demonstrate various SQL statements.


download packege from http://www.mcobject.com/software_eval

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值