Forum Discussion
SeyyedAboalfazl
Apr 06, 2024Copper Contributor
Partitioning of database tables
I have written a query that partitions the tables of a database with a certain criteria. Tables with more than 50 records. ------------------------------------- USE [Post] SET NOCOUNT ON; BEGIN ...
olafhelper
Apr 08, 2024Bronze Contributor
And what is the problem/issue/question?
Tables with more then 50 records and you want to partition it?
Tables with more then 50 records and you want to partition it?
- SeyyedAboalfazlApr 15, 2024Copper Contributorhello.
I partitioned my main table in sql server which has over 12,000,000 records and archived the records before a certain date. My question is, without changing the queries that were written before partitioning this table, if the desired record is not in the partitioned table, will it be automatically searched for that record in the archive table or not? for Exmaple: my Partitioned table is Ordering.Parcel by CreationDateTime datetime(7) partitioned column. I Archived this table and move records before date '20-03-2024' move to Ordering.Parcel_Archived. Now the following query is automatically searched in table Ordering.Parcel_Archived if no record is returned in table Ordering.Parcel or not?
select Id, First_name from Ordering.Parcel where CreationDateTime < '20-03-2024'
it is very difficult to change or add to my written queries in my program.
----
tanks a lot.