Optimization 查询优化(Netezza)

Optimization 查询优化(Netezza),optimization,netezza,Optimization,Netezza,我正试图为我的一个朋友解决Netezza的一个问题。 我的朋友正在尝试在Netezza中做一些非常简单的事情: select * from test where ID1 = 12345 and date >= 12/1/2012 and event date <= 12/31/2012 and ID2 in (x1, x2, ..., x150000) 选择* 从…起 测试 哪里 ID1=12345 日期>=2012年1月12日,事件日期=2012年1月12日,事件日期行“和

我正试图为我的一个朋友解决Netezza的一个问题。 我的朋友正在尝试在Netezza中做一些非常简单的事情:

select * 
from 
test
where 
ID1 = 12345
and date >= 12/1/2012 and event date <= 12/31/2012
and ID2 in
(x1, x2, ..., x150000)
选择*
从…起
测试
哪里
ID1=12345
日期>=2012年1月12日,事件日期=2012年1月12日,事件日期行“和日期>=2012年1月12日,事件日期到底是怎么回事

select * 
from 
test
where 
ID1 = 12345
and eventdate BETWEEN DATE('12/1/2012') DATE('12/31/2012')
and ID2 in
(x1, x2, ..., x150000)

Aginity workbench for netezza版本3.0.791.17116(build 4/19/2012)Comunity版本添加“sql”标记以获得更广泛的观众。表“test”上的分布是什么?ID和ID2是什么数据类型?并修复您的日期逻辑,如@redcayuga所述。。。 date '2012-12-01' date '2012-12-31'
select * 
from 
test
where 
ID1 = 12345
and eventdate BETWEEN DATE('12/1/2012') DATE('12/31/2012')
and ID2 in
(x1, x2, ..., x150000)