473,378 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Query plan / table partitioning

I have set up a test table with range partitioning. The partitions
are by date (recdate):
1) Pre-2004
2) 2004
3) 2005
4) 2006
5) 2007
6) 2008

When executing the query: select * from analysis_data where
year(recdate) = 2006, I would expect that the query plan would utilize
only the partition with 2006 data. However, it seems to do a TBSCAN
across the entire table.

There are no indexes setup on the table. DB2 Version 9.1 fp 4a
Aug 27 '08 #1
2 3785
On Aug 27, 11:07*pm, Justin <kfw...@hotmail.comwrote:
I have set up a test table with range partitioning. *The partitions
are by date (recdate):
1) Pre-2004
2) 2004
3) 2005
4) 2006
5) 2007
6) 2008

When executing the query: select * from analysis_data where
year(recdate) = 2006, I would expect that the query plan would utilize
only the partition with 2006 data. *However, it seems to do a TBSCAN
across the entire table.

There are no indexes setup on the table. *DB2 Version 9.1 fp 4a
Don't know about this, but just an idea: A one-dimensional MDC would
cost almost no space and stop DB2 from scanning the whole table.
Aug 30 '08 #2
On Aug 27, 2:07*pm, Justin <kfw...@hotmail.comwrote:
I have set up a test table with range partitioning. *The partitions
are by date (recdate):
Did you partition by date (i.e., date between '2005-01-01' and
'2005-12-31' or by YEAR(date) = 2005?
-Chris
Sep 8 '08 #3

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

Similar topics

6
by: Mahesh Hardikar | last post by:
Hi , Oracle 8.1.7.0.0 on HP-UX 11.0 I am a newbie as far as PL-SQL is concerned . I have Sybase/MSSQL T-SQL background. We have a report which uses a select statement . This select...
1
by: Peder Bacher | last post by:
Hello :-) My question is: If I query a partitioned view, but don't know the values in the "where x in(<expression>)" clause, i.e.: select * from viewA where intVal in(select intVal from tbl1) ....
0
by: apb18 | last post by:
A bit of query plan strangeness. Suppose you have an inheritance tree such that the columns 'ID' and 'field' appear in the top level table, call that table XXX. tables YYY and ZZZ both inherit...
8
by: Együd Csaba | last post by:
Hi All, how can I improve the query performance in the following situation: I have a big (4.5+ million rows) table. One query takes approx. 9 sec to finish resulting ~10000 rows. But if I run...
6
by: Jack Orenstein | last post by:
Suppose I have a table as follows: testdb=> \d person Table "public.person" Column | Type | Modifiers ------------+-------------------------+----------- id |...
7
by: stig | last post by:
hi. coming from postgresql, i am used to textual references to most of the things i do with the database. i feel a little lost with all the graphical. i have few questions regarding MS SQL 2000...
4
by: db2admin | last post by:
hi, For the following SQL and plan ============================================================== SELECT Q1.PLCY_KY, Q1.PLCY_TRM_EFCTV_DT, Q1.ACNTG_BGN_DT, CASE WHEN ((Q1.PLCY_SRC_CD = '02')...
3
by: Sam Durai | last post by:
Here is a small testcase of the problem which I'm facing in prod env. db2 =describe table tab1 Column Type Type name schema name ...
10
by: Raj | last post by:
I have an MDC index on Big_A.Dt column. The following query always goes for a table scan. SELECT Key, Cd, Dt, SUM(Big_A ) FROM ( SELECT Big_A.Key , small_3.Cd,
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.