EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Can not prepare request: null  XML

Forum Index » GridSQL - General
Author Message
Venkat_B

Member

Joined: 16 Jun 2008 08:39:02
Messages: 45
Offline

Hi,

We are using PostgresPlus 8.3.3 and GridSQL 1.0. I'm having the following error. Can anyone suggest to overcome the problem.

GridSQL -> create table sample_test(col1 integer,col2 date,col3 varchar(10)) partitioning key col1 on nodes 1,3,5,7 with XROWID tablespace tbs_test;
OK
Response time: 0m 0s 454ms Total time: 0m 0s 454ms

and loaded 8million data..... and

GridSQL -> select to_char(col2,'DD-MM-YYYY') from sample_test limit 3;
+------------+
| to_char |
+------------+
| 05-11-2008 |
| 05-11-2008 |
| 05-11-2008 |
+------------+
3 row(s).
Response time: 0m 1s 12ms Total time: 0m 1s 13ms


GridSQL -> select count(1) from sample_test where col2 between to_date('05-11-2008','DD-MM-YYYY') and to_date('05-11-2008','DD-MM-YYYY');
SQLException: ERROR: Can not prepare request: null

The problem is the same above command is running for small set of data (tested with 1000 records)

But coming to huge data we are having the problem.

where as this statement is running fine

GridSQL -> select count(1) from sample_test where to_char(col2,'DD-MM-YYYY') between '05-11-2008' and '05-11-2008';
+---------+
| count |
+---------+
| 8487656 |
+---------+
1 row(s).
Response time: 1m 17s 948ms Total time: 1m 17s 948ms

Any quick reply can help me to move forward.

Thanks,
Venkat


This message was edited 1 time. Last update was at 24 Mar 2009 09:34:59

Mason_S

Senior member

Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline

Hi Venkat,

Can you just do this:

select count(1) from sample_test where col2 between '2008-05-11' and '2008-05-11'? (or don't use the between if you only need one date).

Thanks,

Mason
[WWW]
Venkat_B

Member

Joined: 16 Jun 2008 08:39:02
Messages: 45
Offline

Hi Mason,

Thanks for reply ......

Here we are using that query to check for multiple days.The pasted is which i tested with sample data.
The query which you placed is working fine, but i just want to know why the above statement is throwing error and what does that error means exactly?

Thanks if you provide some detailed explanation for the same error.

Thanks,
Venkat.
 
Forum Index » GridSQL - General
Go to:   
Powered by JForum 2.1.8 © JForum Team