Hi Query Optimization steps

Hi Query Optimization steps

am 22.08.2009 12:01:29 von bharani kumar

--001636e1f93897d0c50471b81190
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi all

Tell Me few Query Optimization Tips ....

For example.. some people saying that , avoid using more of and condition in
the query....

This sort of very basic things please tell me ...

Also tell me , in the optimization view ,, which database engine is best....

Thanks

Bharanikumar

--001636e1f93897d0c50471b81190--

Re: Hi Query Optimization steps

am 24.08.2009 16:46:16 von mos

At 05:01 AM 8/22/2009, you wrote:
>Hi all
>
>Tell Me few Query Optimization Tips ....
>
>For example.. some people saying that , avoid using more of and condition in
>the query....

Huh? You need to carefully plan your table structure and use indexes
sparingly on the columns you are using in the Where clauses. An EXPLAIN in
front of the Select statement will show you which indexes it is using.


>This sort of very basic things please tell me ...
>
>Also tell me , in the optimization view ,, which database engine is best....

If you need transactions or RI then you have to use InnoDb. Otherwise
MyISAM is quite fast. Again it depends on the type of queries you are
executing.


>Thanks
>
>Bharanikumar

There is no magic wand to getting MySQL to run faster except planning and
knowledge. It will take some effort on your part but it will be fun.

Take a look at High Performance MySQL 2nd Edition. Some of the first
edition is online at
http://books.google.com/books?id=sgMvu2uZXlsC&printsec=front cover&dq=high+performance+mysql#v=onepage&q=&f=false

You can get the second edition at Amazon. Also you may need to read other
MySQL books like MySQL Cookbook
http://books.google.com/books?id=aC3blgT3D3YC&printsec=front cover&dq=mysql+cookbook#v=onepage&q=&f=false
The 2nd edition is at Amazon.

or MySQL by Paul DuBois is also quite good. These will get you started on
the right foot.

Mike


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Hi Query Optimization steps

am 26.08.2009 06:48:08 von bharani kumar

--0016368e223a52af1504720428e8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Then which DB engine is better.....

Thanks

On Mon, Aug 24, 2009 at 8:16 PM, mos wrote:

> At 05:01 AM 8/22/2009, you wrote:
>
>> Hi all
>>
>> Tell Me few Query Optimization Tips ....
>>
>> For example.. some people saying that , avoid using more of and condition
>> in
>> the query....
>>
>
> Huh? You need to carefully plan your table structure and use indexes
> sparingly on the columns you are using in the Where clauses. An EXPLAIN in
> front of the Select statement will show you which indexes it is using.
>
>
> This sort of very basic things please tell me ...
>>
>> Also tell me , in the optimization view ,, which database engine is
>> best....
>>
>
> If you need transactions or RI then you have to use InnoDb. Otherwise
> MyISAM is quite fast. Again it depends on the type of queries you are
> executing.
>
>
> Thanks
>>
>> Bharanikumar
>>
>
> There is no magic wand to getting MySQL to run faster except planning and
> knowledge. It will take some effort on your part but it will be fun.
>
> Take a look at High Performance MySQL 2nd Edition. Some of the first
> edition is online at
> http://books.google.com/books?id=sgMvu2uZXlsC&printsec=front cover&dq=high+performance+mysql#v=onepage&q=&f=false
>
> You can get the second edition at Amazon. Also you may need to read other
> MySQL books like MySQL Cookbook
>
> http://books.google.com/books?id=aC3blgT3D3YC&printsec=front cover&dq=mysql+cookbook#v=onepage&q=&f=false
> The 2nd edition is at Amazon.
>
> or MySQL by Paul DuBois is also quite good. These will get you started on
> the right foot.
>
> Mike
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=bharanikumariyerphp@gmail .com
>
>


--
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/

--0016368e223a52af1504720428e8--

Re: Hi Query Optimization steps

am 26.08.2009 11:08:02 von Joerg Bruehe

Hi!


bharani kumar wrote:
> Then which DB engine is better.....
>=20

Which fruit is better, an apple or a banana?

And if X is better, why do farmers still grow Y, and why do people bu=
y it?


More serious:
Different engines offer different features, as described in the manua=
l.
The most obvious differences are full-text search (MyISAM) versus
transactions and referential integrity (InnoDB), but there are more.
During your database schema design you should for each table select t=
he
engine which is appropriate.


Jörg

--=20
Joerg Bruehe, MySQL Build Team, Joerg.Bruehe@Sun.COM
Sun Microsystems GmbH, Komturstraße 18a, D-12099 Berlin
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering Muenchen: HRB1610=
28


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

RE: Hi Query Optimization steps

am 26.08.2009 15:26:58 von Jerry Schwartz

>-----Original Message-----
>From: Joerg.Bruehe@Sun.COM [mailto:Joerg.Bruehe@Sun.COM]
>Sent: Wednesday, August 26, 2009 5:08 AM
>To: mysql@lists.mysql.com
>Cc: bharani kumar
>Subject: Re: Hi Query Optimization steps
>
>Hi!
>
>
>bharani kumar wrote:
>> Then which DB engine is better.....
>>
>
>Which fruit is better, an apple or a banana?
>
>And if X is better, why do farmers still grow Y, and why do people buy it?
>
[JS] Good answer. I did performance consulting for over 25 years, on *NIX
and other operating systems, and there was one response that suited all
questions: "It depends".

Regards,
 
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
 
860.674.8796 / FAX: 860.674.8341
 
www.the-infoshop.com







--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org