我做了一个简单的测试Vertica
:
ha=> insert into test(Name, City) values( 'Nan', 'Nanjing');
OUTPUT
--------
1
(1 row)
ha=> select node_name, wos_row_count, ros_row_count from projection_storage where anchor_table_name = 'test';
node_name | wos_row_count | ros_row_count
---------------+---------------+---------------
v_ha_node0001 | 1 | 3
(1 row)
ha=> select * from test;
ID | Name | City
--------+------+---------
250001 | Nan | Nanjing
250002 | Nan | Nanjing
250003 | Nan | Nanjing
250004 | Nan | Nanjing
(4 rows)
select
操作显示OK(里面的数据WOS
全部显示ROS
)。
然后我写了一个简单的程序,它使用ODBC
:
ret = SQLExecDirect(stmt_handle, (SQLCHAR*)"select * from test", SQL_NTS);
if (!SQL_SUCCEEDED(ret))
{
printf("Execute statement failed\n");
goto ERR;
}
while ((ret = SQLFetch(stmt_handle)) == SQL_SUCCESS)
{
row_num++;
}
printf("Row number is %d\n", row_num);
但结果是:
Row number is 3
它不计算WOS
.
并且DbVisualizer
还显示 3 行数据:
它是否需要一些特殊的选项来使用ODBC
?首先十分感谢!