473,847 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

256 table limit for partitioned views

I have a partitioned view sitting over several tables and I'm slowly
approaching the 256 number. Can anybody confirm if there is such a
limit for the maximum number of tables that a partitioned view can
hold?

If this is true, does anybody have any suggestions or ideas to work
around this max limit?

TIA!

Aug 8 '05 #1
4 3505
karthik (ka***********@ gmail.com) writes:
I have a partitioned view sitting over several tables and I'm slowly
approaching the 256 number. Can anybody confirm if there is such a
limit for the maximum number of tables that a partitioned view can
hold?
Yes, since the maximum number of tables per query is 256 I would
expect that there is such a limit.
If this is true, does anybody have any suggestions or ideas to work
around this max limit?


How big are your tables? Would it be possible to consolidate them?

In SQL 2005 there is partioned tables, which is taking this to another
level. I don't know how many partitions you can have in a table, but
it's a new ballpark.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Aug 8 '05 #2
The limit is 256 tables "per SELECT statement", not per query.
Therefore, a UNION query can have more than 256 tables, but
unfortunately, such a query may not be used in a view. For example:

CREATE TABLE T (X INT)
INSERT INTO T VALUES (1)
DECLARE @SQL varchar(8000)

SELECT @SQL=ISNULL(@SQ L+' UNION ALL ','')+'SELECT X FROM T'
FROM (SELECT DISTINCT number FROM master..spt_val ues
WHERE number BETWEEN 0 AND 256) X

--PRINT LEN(@SQL)
EXEC(@SQL)

SET @SQL='CREATE VIEW V AS '+@SQL
EXEC (@SQL)

For more informations, see:
http://groups-beta.google.com/group/...85c192f511bd1a

Razvan

Aug 9 '05 #3
Razvan Socol (rs****@gmail.c om) writes:
The limit is 256 tables "per SELECT statement", not per query.
Therefore, a UNION query can have more than 256 tables, but
unfortunately, such a query may not be used in a view. For example:
Thanks Razvan. I did notice "per SELECT statement", but I was too lazy
to get a practical interpretation of what that really meant.
For more informations, see:
http://groups-beta.google.com/group/...85c192f511bd1a


That's a useful link!
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Aug 9 '05 #4
Thanks Razvan and Erland....I guess I'm just going to wait for the
Partitioned Tables feature in SQL Server 2005.

Aug 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
11971
by: Warren Wright | last post by:
Hello, We maintain a 175 million record database table for our customer. This is an extract of some data collected for them by a third party vendor, who sends us regular updates to that data (monthly). The original data for the table came in the form of a single, large text file, which we imported. This table contains name and address information on potential
10
5729
by: bsandell | last post by:
I need to write a stored procedure to verify that a table exists and also that the user executing the stored procedure has access to the specified table. Any user can call this publicly available procedure and pass a database name, an owner name and a table name as parameters. The procedure returns success if the table exists and the user has access to it, or fails if he doesn't. Here's a simplified version of what I have, but I'm...
8
3628
by: Zero.NULL | last post by:
Hi, We are using Month-year tables to keep the history of long transaction of our application. For example: We capture the details of a certain action in table "TransDtls<CurrMonth><CurrYear>" (this month: TransDtls072005). This way tables keep growing. every month a new table gets created. We have done it because we estimated that every month year table will carry around 2 - 3 Lac records and most of the time the operations will
10
2400
by: Sumanth | last post by:
Hi, I have a table that I would like to partition. It has a column c1 which has 100 distinct values. I was planning to partition the table on column c1 using a partioned index, and then apply data partitioned secondary indexes on the table. I then read about partioned table spaces, How do I get the same behaviour as above by creating a partioned table space?Do I create the partion table space, create the
11
1896
by: steve.keanie | last post by:
Hi ... we're a mainframe V7 shop planning an imminent upgrade to V8. My application team is converting an IMS DB into a DB/2 table ... approximately 40GB of uncompressed (~20 GB compressed) data spread over 10 partitions. Approximately 35% of the data is "inactive" (easily identifiable as such) and of limited (but some) use. We require 2 non-partitioning indexes on the data. The DBA group would like us to put the "inactive" data into a...
15
3695
by: Piero 'Giops' Giorgi | last post by:
Hi! I have a question: I already have a DB that uses partitions to divide data in US Counties, partitioned by state. Can I use TWO levels of partitioning? I mean... 3077 filegroups and 50 partition functions that address
0
1686
by: Damir | last post by:
Hello all! I created a range-partitioned table, and noticed that indexes were created as "NOT PARTITIONED" (through db2look), even though I ran the index creating commands without this parameter. Not that I care too much now about it :-) But what will happen when once upon a time in the future I execute the "attach partition" command, and so add another partition to the existing (partitioned) table. Will the indexes then be automatically...
6
8081
by: shawno | last post by:
Hi, We're running DB2 v8.1 on a windows platform and have a database that is quite large. It basically contains one table with a BLOB field (each blob is a zip file, maybe 500K to 1MB), and this particular table is close to 300GB in size. We are not experiencing any problems, and there is plenty of space on the server, but I was just wondering if there is limit in DB2 to how big this table can get. We are guessing it is going to...
2
13640
by: eeriehunk | last post by:
Hi All, Is it possible to create a partitioned index on a table which is not partitioned? If so what is such a partition called and please explain? I have done some research on partitions and index partitions and this is where I hit the wall the 2nd time. As per my study there are 3 types of indexed partitions: Global index (which is on an entire partitioned table) then there is Local Index (on just the partition of the table) and then there...
0
9881
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9727
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10982
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10706
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10331
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9480
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7880
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5909
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.