MySQL Forums
Forum List  »  Newbie

Re: Very long query doubt... (Monster query...)
Posted by: Toni Lopez
Date: March 30, 2009 09:02AM

(Sorry!, but the querys im trying to post, to show you are bigger than the space permitted to post XD, so I will put only the smallest one in a few posts, to make shure you can read it all, thanks again!)

Hi again!

First of all, thanks for your time, and of course for your answer!

Sorry if the first query wasn't easily readable.

Ok here I go with the information from my table (now named prepara_sales_mix):

Note: The data values are correct, in the examples below, wont be reals, try to imagine one year. Maybe the worst case, will be, comparing 2 years, 2008-02-01 between and 2009-02-01 and compared with past year, and the other pair will be 6 months compared with past 6 months.

-------------------------
Status:

Name  	 Engine  	 Version  	 Row_format  	 Rows 
prepara_sales_mix  	MyISAM  	9  	Dynamic  	7225939

Avg_row_length  	 Data_length  	 Max_data_lengt
36  	261359172  	4294967295  	

Index_length  	 Data_free  	 Auto_increment 
69030912  	0  	NULL	 

The other cols from status command wont be useful,don't you think so?


-----------------

Describe table results:
Field
	
Type
	
Null
	
Key
	
Default
	
Extra
fecha 	date 	  	MUL 	0000-00-00 	 
cod_articulo 	varchar(40) 	  	  	  	 
cod_oper 	varchar(6) 	  	  	  	 
cod_serie 	int(5) 	  	  	0 	 
clase 	char(1) 	  	MUL 	  	 
cantidad 	float(11,2) 	YES 	  	0.00 	 
precio 	float(11,2) 	YES 	  	0.00 	 
dto 	float(11,2) 	YES 	  	0.00 	 



Index Information:
Name  	Type  	Cardinality    	Campo
fecha 	INDEX 	699  	 	fecha
cod_art INDEX 	7022  	clase cod_articulo


-----------------



Edited 2 time(s). Last edit at 03/30/2009 09:06AM by Toni Lopez.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.