You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by joseheitor <jo...@heitorprojects.com> on 2018/12/07 12:36:59 UTC
IGNITE_MAX_INDEX_PAYLOAD_SIZE
Hi,
How do we set the global default IGNITE_MAX_INDEX_PAYLOAD_SIZE?
(Note: Adding INLINE_SIZE xx to a CREATE INDEX command, as per the docs is
throwing an SqlException!)
Thanks,
Jose
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: IGNITE_MAX_INDEX_PAYLOAD_SIZE
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
I believe if all fields' lengths are known (e.g. number columns) it is the
exact number of bytes required to store them.
If some of lenghts are unknown I believe it's 10 by default.
Not sure you can introspect it after index is created.
Regards,
--
Ilya Kasnacheev
сб, 8 дек. 2018 г. в 08:38, joseheitor <jo...@heitorprojects.com>:
> Thanks, Ilya.
>
> How can find the payload size of an existing index?
>
> Jose
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: IGNITE_MAX_INDEX_PAYLOAD_SIZE
Posted by joseheitor <jo...@heitorprojects.com>.
Thanks, Ilya.
How can find the payload size of an existing index?
Jose
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: IGNITE_MAX_INDEX_PAYLOAD_SIZE
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Yes, you should put a number there, instead of "true". My bad.
As for your problem, I have filed a ticket:
https://issues.apache.org/jira/browse/IGNITE-10602
You can work around this problem by invoking every CREATE INDEX in its own
statement.
Regards,
--
Ilya Kasnacheev
пт, 7 дек. 2018 г. в 18:53, joseheitor <jo...@heitorprojects.com>:
> I have found that issuing the CREATE INDEX commands separately (not as part
> of a multiple-statement command) works fine.
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: IGNITE_MAX_INDEX_PAYLOAD_SIZE
Posted by joseheitor <jo...@heitorprojects.com>.
I have found that issuing the CREATE INDEX commands separately (not as part
of a multiple-statement command) works fine.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: IGNITE_MAX_INDEX_PAYLOAD_SIZE
Posted by joseheitor <jo...@heitorprojects.com>.
Thanks, Ilya,
Isn't the IGNITE_MAX_INDEX_PAYLOAD_SIZE setting expecting a number
(byte-count)?
The SQL command(s) I run is as follows:
String cmd = "DROP TABLE IF EXISTS public.transactions;" +
"DROP INDEX IF EXISTS transactions_id_k_v;" +
"DROP INDEX IF EXISTS transactions_k_v_id;" +
"DROP INDEX IF EXISTS transactions_pk_id;" +
"CREATE TABLE public.transactions (pk INT, id INT, k
VARCHAR, v VARCHAR, PRIMARY KEY (pk, id))" +
" WITH \"TEMPLATE=REPLICATED, BACKUPS=0,
ATOMICITY=TRANSACTIONAL_SNAPSHOT, WRITE_SYNCHRONIZATION_MODE=FULL_SYNC,
AFFINITY_KEY=id\";" +
"CREATE INDEX transactions_id_k_v ON
public.transactions (id, k, v) INLINE_SIZE 150;" +
"CREATE INDEX transactions_k_v_id ON
public.transactions (k, v, id) INLINE_SIZE 150;" +
"CREATE INDEX transactions_pk_id ON public.transactions
(pk, id) INLINE_SIZE 20;";
---------------------------------------------------------->
The error I get is:
java.sql.SQLException: Failed to parse query. Syntax error in SQL statement
"CREATE INDEX TRANSACTIONS_ID_K_V ON PUBLIC.TRANSACTIONS (ID, K, V)
INLINE_SIZE[*] 150;CREATE INDEX TRANSACTIONS_K_V_ID ON PUBLIC.TRANSACTIONS
(K, V, ID) INLINE_SIZE 150;CREATE INDEX TRANSACTIONS_PK_ID ON
PUBLIC.TRANSACTIONS (PK, ID) INLINE_SIZE 20; "; SQL statement:
CREATE INDEX transactions_id_k_v ON public.transactions (id, k, v)
INLINE_SIZE 150;CREATE INDEX transactions_k_v_id ON public.transactions (k,
v, id) INLINE_SIZE 150;CREATE INDEX transactions_pk_id ON
public.transactions (pk, id) INLINE_SIZE 20; [42000-197]
at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
at
com.example.ignite.IgniteApplication.initSQLDatabase(IgniteApplication.java:91)
at com.example.ignite.IgniteApplication.main(IgniteApplication.java:52)
--------------------------------------------------------------------------------------->
What am I doing wrong?
Jose
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: IGNITE_MAX_INDEX_PAYLOAD_SIZE
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Just start your JVM with -DIGNITE_MAX_INDEX_PAYLOAD_SIZE=true or set
IGNITE_MAX_INDEX_PAYLOAD_SIZE environment variable to "true" before
starting JVM.
INLINE_SIZE worked the last time I have checked. Can you show the exact
statement and error message?
Regards,
--
Ilya Kasnacheev
пт, 7 дек. 2018 г. в 15:37, joseheitor <jo...@heitorprojects.com>:
> Hi,
>
> How do we set the global default IGNITE_MAX_INDEX_PAYLOAD_SIZE?
>
> (Note: Adding INLINE_SIZE xx to a CREATE INDEX command, as per the docs is
> throwing an SqlException!)
>
> Thanks,
> Jose
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>