Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Different queries for different dates.

Hi ,

I have a situation where I need to use different queries on the same tables based on the value in the date field. For example if the date is less than 20170201 , use QUERY1 else use QUERY 2.

I was wondering as to how I could generate projections for these queries. One option would be to generate projections for both queries separately. But in this case, both sets of projections would be updated if one adds new data, whereas actually only one of the sets would need to be updated (since the other set is used only on historical old data).

Is there a way in vertica to handle this particular scenario ? Feel free to let me know if you need more information.

Thanks
Babinu

Comments

  • Hi Babinu,

    Do you really need separate projections to answer both of these queries? I would suggest to create one projection that could answer both queries efficiently enough (e.g. sorting on the date column you are using is advisable). It really depends on the types of queries though, so to be able to help you in more detail I need to know which queries you are running.

    Cheers,
    Derek

  • skamatskamat Administrator

    Agree with Derek. Please use database designer and pass both queries and it should suggest projection that is good for both queries .

Leave a Comment

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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.