Re: Query about running SQL with durable memory

2017-08-14 Thread vkulichenko
Dmitry,

When you execute a SQL query, there is no deserialization at all. Ignite
stores data in binary format that allows to lookup fields without full
deserialization. So only required fields are fetched from the objects.

https://apacheignite.readme.io/docs/binary-marshaller

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Query-about-running-SQL-with-durable-memory-tp16015p16183.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Query about running SQL with durable memory

2017-08-14 Thread Dmitri Bronnikov
If memory cache is empty and all 10 entries are on disk, will Ignite
de-serialize all of them? Can de-serialization be avoided if the query has a
filter, e.g. SELECT COUNT(*) FROM EMP WHERE SALARY > ?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Query-about-running-SQL-with-durable-memory-tp16015p16180.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Query about running SQL with durable memory

2017-08-08 Thread Dmitriy Setrakyan
On Sat, Aug 5, 2017 at 10:17 PM, iostream <sidds.mo...@gmail.com> wrote:

> Suppose I have 10 Person entries in the disk, out of which only 5 are
> in-memory. Now if I run a SQL query which is expected to count the number
> of
> entries in Person cache, will the query run only on the disk or RAM or will
> it run on both?
>

The SQL query will simply run over the total data set, which is 10 persons,
but it will obviously process the data that is cached in-memory faster. You
can also speed up SQL queries by indexing the data.


>
> If the query will run on both the disk and RAM, will the count be 10 or 15
> (10 on disk + 5 in RAM)? Does the SQL processor know which entries are
> present in-memory to resolve duplicates?
>
>
If I understand your example correctly, then the super-set of data is 10
Persons (right?). In this case, the total count returned by Ignite will be
10.


>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Query-about-running-SQL-with-
> durable-memory-tp16015.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: Query about running SQL with durable memory

2017-08-07 Thread afedotov
Hi,

The count should be 15.
If a page is not found in RAM, then the durable memory will request it from
the Persistent Store.
Please check
https://apacheignite.readme.io/v2.1/docs/distributed-persistent-store#section-usage

Are you observing a different behavior?


Kind regards,
Alex.

On Sun, Aug 6, 2017 at 8:17 AM, iostream [via Apache Ignite Users] <
ml+s70518n16015...@n6.nabble.com> wrote:

> Hi,
>
> I want to understand how SQL queries work when persistence store is
> enabled in v2.1.
>
> Suppose I have 10 Person entries in the disk, out of which only 5 are
> in-memory. Now if I run a SQL query which is expected to count the number
> of entries in Person cache, will the query run only on the disk or RAM or
> will it run on both?
>
> If the query will run on both the disk and RAM, will the count be 10 or 15
> (10 on disk + 5 in RAM)? Does the SQL processor know which entries are
> present in-memory to resolve duplicates?
>
> Thanks!
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Query-
> about-running-SQL-with-durable-memory-tp16015.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1...@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=1=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Query-about-running-SQL-with-durable-memory-tp16015p16031.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Query about running SQL with durable memory

2017-08-05 Thread iostream
Hi,

I want to understand how SQL queries work when persistence store is enabled
in v2.1.

Suppose I have 10 Person entries in the disk, out of which only 5 are
in-memory. Now if I run a SQL query which is expected to count the number of
entries in Person cache, will the query run only on the disk or RAM or will
it run on both? 

If the query will run on both the disk and RAM, will the count be 10 or 15
(10 on disk + 5 in RAM)? Does the SQL processor know which entries are
present in-memory to resolve duplicates?

Thanks!





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Query-about-running-SQL-with-durable-memory-tp16015.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.