Split table
-
Hi i want to split one large table into two. But here my problem is, i need to query from both the tables, which should give the data same as the parent table. For example If the large table is like
COLA COLB
1 A
2 B
3 C
4 D
5 Eand if i split this into FIRST table
COLA COLB
1 A
3 C
5 ESecond table as
COLA COLB
2 B
4 DNow i want to query the two tables, so that i should give the value order by COLA. Result shold be like
COLA COLB
1 A
2 B
3 C
4 D
5 EMy small attempt...
-
Hi i want to split one large table into two. But here my problem is, i need to query from both the tables, which should give the data same as the parent table. For example If the large table is like
COLA COLB
1 A
2 B
3 C
4 D
5 Eand if i split this into FIRST table
COLA COLB
1 A
3 C
5 ESecond table as
COLA COLB
2 B
4 DNow i want to query the two tables, so that i should give the value order by COLA. Result shold be like
COLA COLB
1 A
2 B
3 C
4 D
5 EMy small attempt...
-
This should do the trick:
select cola, colb
from(
select cola, colb from table1
union all
select cola, colb from table2
) d
order by colaBut I don't see why you should split a table in two.
Wout Louwers
Actually i have one billion records in this table all are logs from a server machine. But only some specific error logs are used to process. To get better performance i am planning to do the same
My small attempt...
-
Actually i have one billion records in this table all are logs from a server machine. But only some specific error logs are used to process. To get better performance i am planning to do the same
My small attempt...
-
i am creating some reports by parsing the error logs in that tables. SO i need all the error logs in the table. That y planed to move irrelevant data. The table is indexed... Any other technique?
My small attempt...
-
i am creating some reports by parsing the error logs in that tables. SO i need all the error logs in the table. That y planed to move irrelevant data. The table is indexed... Any other technique?
My small attempt...
Look into partitioning the table by periods.
Never underestimate the power of human stupidity RAH
-
Look into partitioning the table by periods.
Never underestimate the power of human stupidity RAH
That also did.. Right now i have different partition files to keep data for this table
My small attempt...