473,473 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

database Partitioning

78 New Member
hi friends,
I heard about Improving Database Performance with Partitioning. But I dont have a clear idea about that. what is the concept behind that and how to do that.
Aug 17 '13 #1
7 1327
Luuk
1,047 Recognized Expert Top Contributor
One of the thing is that, if you have a lot of data,
and your queries are mostly resulting in data from last month,
than partitioning could be an improvement. Your database would only have to look in a smaller piece of your data to retrieve result.

And occasionally you are still able to find all old data.

You can read more on this here:
http://dev.mysql.com/tech-resources/...titioning.html
Aug 17 '13 #2
Ammu
78 New Member
thank you @Luuk for your response.
I have gone thru that site.
I got an idea about that.
But I failed to run this code. Procedure is not created.
Expand|Select|Wrap|Line Numbers
  1. CREATE PROCEDURE load_part_tab()
  2.     begin
  3.       declare v int default 0;
  4.               while v < 8000000
  5.      do
  6.       insert into part_tab
  7.       values (v,'testing partitions',adddate('1995-01-01',(rand(v)*36520) mod 3652));
  8.      set v = v + 1;
  9.      end while;
  10.    end
can you pls help me to sove this issue

error
MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
Aug 21 '13 #3
univercel
11 New Member
Print the SQL query and post it, you might have made small synatx mistake.
Aug 21 '13 #4
Luuk
1,047 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. [test]> delimiter //
  2. [test]>
  3. [test]>
  4. [test]>     CREATE PROCEDURE load_part_tab()
  5.     ->         begin
  6.     ->           declare v int default 0;
  7.     ->                   while v < 8000000
  8.     ->          do
  9.     ->           insert into part_tab
  10.     ->           values (v,'testing partitions',adddate('1995-01-01',(rand(v)*36520) mod 3652));
  11.     ->          set v = v + 1;
  12.     ->          end while;
  13.     ->        end
  14.     ->
  15.     -> //
  16. Query OK, 0 rows affected (0.06 sec)
  17.  
  18. [test]> delimiter ;
  19.  
  20.  
hmm, seems ok, so let's execute it:
Expand|Select|Wrap|Line Numbers
  1. [test]> call load_part_tab();
  2. ERROR 1146 (42S02): Table 'test.part_tab' doesn't exist
  3. [test]>
  4.  
  5.  
i dont't have the table --> test OK
Aug 21 '13 #5
Ammu
78 New Member
@Luuk still not working. showing the same error.
I got this code from that reference site you have given to me. why its not working for me..
Aug 23 '13 #6
Ammu
78 New Member
hi now it works.... procedure created. thank you so much for your help @luuk

thank you @univercel
Aug 23 '13 #7
Luuk
1,047 Recognized Expert Top Contributor
@Ammu (and others!):
Please remember that it is of almost no use to say:
"showing the same error"

It's far better to copy/paste the exact error message here.

For example if you claim that you get an error when using the 'DIR' command, you should post someting like this:
Expand|Select|Wrap|Line Numbers
  1. C:\temp>dir *.notfound
  2.  Volume in drive C is MyDrive
  3.  Volume Serial Number is 1234-1234
  4.  
  5.  Directory of C:\temp
  6.  
  7. File Not Found
  8.  
  9. C:\temp>
(the answer to this is too Obvious to explain ;) )
Aug 23 '13 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Jeff Boes | last post by:
I'm sure this is a concept that's been explored here. I have a table (fairly simple, just two columns, one of which is a 32-digit checksum) with several million rows (currently, about 7 million)....
7
by: Jane | last post by:
In Oracle we can partition a table as follows. What is the equivalent in DB2? CREATE TABLE sales_list (salesman_id NUMBER(5), salesman_name VARCHAR2(30), sales_state VARCHAR2(20),...
19
by: Steve Jorgensen | last post by:
I've run across this issue several times of late, and I've never come up with a satisfactory answer to the best way to handle this schema issue. You have a large section of schema in which a...
9
by: TC | last post by:
I need to design a system which represents multiple "projects" in SQL Server. Each project has the same data model, but is independent of all others. My inclination is to use one database to store...
10
by: shsandeep | last post by:
DB2 V8.2 (not Viper yet and no range partitioning!!) I have created a table T1 (col1, col2) with col1 as the primary key. When I try to create a partitioning key on col2, it gives me error that it...
8
by: mitek | last post by:
Hi, All I have strange situation with table design for DB2 9.1 on Windows I have 3 tables with same structure : 1 table - is MDC 2 table - is partitioned MDC table 3 table - is compressed...
10
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
1
by: Chessie | last post by:
I'm currently working on Table Partitioning. I have done everything succesfull for partitioning, what I'm struggling with is to use " SELECT MAX(NAME) from sys.filegroups WHERE NAME NOT LIKE...
15
by: Woody Ling | last post by:
I am starting to config a 64 bits DB2 in IBM 595 AIX box with 2 dual core CPU and I would like to assigned one 'processor' for one db partition. Should I config it as a 4 nodes or 2 nodes...
1
by: bandlan | last post by:
Hi all, I am new to Database Partitioning Feature, Could any of you please send me manuals which help DBAs day-to-day roles. Thanks in advance Bandla
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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,...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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.