How to get Data from Single Node


I have a table with segmented and i have loaded the data .i have 3 node cluster and the data is spread across cluster and i want to fetch the data which is only resides in Node1.Is it possible to get.


Create table ABC( A Int,B Varchar); ## segmentation is on A and B

i have inserted 20 rows..and the rows are distributed across and i can see that in Projection_storage

Lets the data reside like this.

Node 1--- 7 rows
Node2--7 rows
Node 3-- 7 rows

Now i want to extract only Node 1 data which are 7 rows only.

Can it be possible???



  • Yes, but less efficiently than you want.

    select * from ABC where local_node_name() = 'v_blah_node0001';

    Sadly this query will run on all nodes but only source data from node 1 -- so it occupies more resources on the cluster than it needs to.

    A word of caution about the local_node_name() function: it returns the node name of the node on which the function runs. In this case the WHERE clause gets pushed down next to the scan, so the function runs where the data row is stored. In a more complicated query, the optimizer might be running the function somewhere else. EXPLAIN will show you where the optimizer has put it.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file