Running a Distributed Query

SAP Sybase IQ is more likely to distribute a query that processes a large number of rows than those that require fewer resources.

This task includes two scripts that load and query a significant amount of sample data (10 million rows). The first script creates and loads a Fact table and a Dimension table. The second script runs a query that fetches 3 rows, and generates a query plan in the coordinator and write server directories.

Note: Depending on your system configuration and amount of data, SAP Sybase IQ may choose a query plan that does not distribute to the write server.
  1. Choose All Programs > Sybase IQ 16.0 > Interactive SQL.
  2. On the Connect dialog, enter:
    Tab Name Field Value

    Identification

    Authentication

    Database

    User ID

    DBA or dba (case-insensitive)

    Password

    sql (case-sensitive)

    Action

    Connect to a running database on this computer

    Server name

    <localhost>_iqdemo

    Database name

    iqdemo
    Network TCP/IP protocol options Host <localhost>
    Port 2638
  3. Click Connect.
  4. In Interactive SQL, click File > Open.
  5. Browse to %ALLUSERSPROFILE%\SybaseIQ\demo, and choose dqpdata.sql.
  6. Click Open.
  7. Press F9 to create and load the Dimension table and Fact table.
  8. Click File > Open.
  9. Browse to %ALLUSERSPROFILE%\SybaseIQ\demo, and choose dqpquery.sql.
  10. Click Open.
  11. Press F9 to run the script that runs the query and generates the query plan.