Jump to content

Sql Help Pls - How To Approach


Recommended Posts

Posted

Menu SQL server anukonna...nenu chipincha concept SQL server dhi...
Oracle ki google chesuko or may be others can helps...

Imho, triggers are not good as you have to insert millions of rows..trigger will fire for each insert...
Nee issue datawarrhouse lo data load chesinapudu chestharu sliding window partition anni...look. For similar in oracle..

 

ya chushna..

 

looking into it..

 

thanks alot for putting lot of effort..

Posted

partition table concept in oracle telsa evarkaina..

 

hash partition tho same table_A structure tho Table_B create cheshna with 60 partitions..so p1,p2,p3....p60 partitions unai table ki..

 

now i can simply do a insert into Table_b from Table_A..like insert into Table_B select * from Table_A;

 

na doubt entante..

 

when i try to insert the data again into that table..to which partition will the data go into? first insert cheshna data p2 lo poyi..second insert cheshna data p1 lo untadha..

 

can i direct the data to go into specific partition everytym..

 

this is the first tym m working with partition table..so conceptual ga emana miss aithe pls help me..

bhayya, again this is SQL server concept but conceptually i would think it would same across RDMS and since noone else replied, here is how it works conceptually in SQL..

 

Step 1

----------------

you need to define partition boundary points using partition function - partition function covers range of values from -infinit to +infinity,

 

Example: if your boundary points are 100,200,300,400 -- it means, values from -infinity to 100 belong to partition 1,

                                                                                          100 to 200 belong to partition2,

                                                                                          201 to 300 belong to partition 3,

                                                                                          301 to 400 belong to partition 4 and

                                                                                          401 to +infinty belong to partition5

 

Now you have defined the boundary points for your partitions.

 

Step2

----------------

now, you will have a create method to apply the boundary points to the Partitions.remember, in step 1 you will only define the boundary points.

in step2, you will apply those boundary points to the partitions.  In other words, you will define that partition1 will hold these range of values, partition 2 will hold these range of values...etc...

 

Step3

-----------

now, just create the table on the method(created in step2)

 

i tired to explain how it works on a high level.. good luck... youtube lo videos chudu..

Posted

I too think trigger as the solution trigger lo by date records thiskuni corresponding insert cheyochu anukuntunna.... I mean from day 1 oka feild pettukuni adi update cheesko day 1 day 2 ani while inserting refer this feild and insert accordingly.. r u doing this once in a day or for each record .... table needs index vuntayi GA? I will search and tell trigger is best or any other alternative.... its been long time I worked on SQL ....

Posted

spider solution vachinda ?? where r u calling procedure in trigger ?

×
×
  • Create New...