Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-30 Thread Jan Steinman
> From: Zbigniew 
> 
> Now to the point: considering, that the second column shall contain
> about 100-200 different "labels" - so in average many of such labels
> can be repeated one million times (or even more) 

What about using ENUMs? They have nearly the performance of INTEGERs, but you 
don't have to maintain a string mapping in your programming logic.

 Yes'm, old friends is always best, 'less you can catch a new one that's 
fit to make an old one out of. -- Sarah Jewett
 Jan Steinman, EcoReality Co-op 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-30 Thread Jan Steinman
> From: Zbigniew 
> 
> Now to the point: considering, that the second column shall contain
> about 100-200 different "labels" - so in average many of such labels
> can be repeated one million times (or even more) 

What about using ENUMs?

They have essentially the performance of INTEGERs, but you don't have to 
maintain a string mapping in your programming logic.

 Yes'm, old friends is always best, 'less you can catch a new one that's 
fit to make an old one out of. -- Sarah Jewett
 Jan Steinman, EcoReality Co-op 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-30 Thread hsv
 2014/10/29 20:56 +0100, Zbigniew 
Now to the point: considering, that the second column shall contain
about 100-200 different "labels" - so in average many of such labels
can be repeated one million times (or even more) - will it speed-up
the selection done with something like "...WHERE label='xyz' AND
date='2013-02-25' " (and maybe the insertion as well?), if instead of
textual labels I'll use SMALLINT as simple integer "code" for each
different "label" (and in my program a translation table)?

If so - will I have further performance gain, if instead of
human-readable DATE for the third column I'll use "Unix time" put into
INTEGER type column, not DATE-type? 

I really cannot answer your real question, but say only that DATE and other 
time types are numeric, although mostly constructed.
DATE takes three bytes with range '1000-01-01' to '-12-31'.
TIMESTAMP (which has special features that one can suppress) is a four-byte 
integer that is a 31-bit Unix timestamp with range '1970-01-01 00:00:01.00' 
UTC to '2038-01-19 03:14:07.99' UTC.

Maybe TIMESTAMP, which doubtless uses the underlying integer mechanism for 
comparison, is best for you. Consider also the functions UNIX_TIMESTAMP and 
FROM_UNIXTIME.

The zone is not involved in DATE, but is involved in the rest aforesaid.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Which replication solution should I choose?

2014-10-30 Thread Heck, Walter
Hi Johan,

it'll be a good ol' war story of the transition of a large 130k QPS MMM
cluster to PXC, so come visit for sure. Here's the link to the session:
http://www.percona.com/live/london-2014/sessions/moving-mysql-infrastructure-130k-qps-galera

see you there :)

cheers,

On Thu, Oct 30, 2014 at 11:39 AM, Johan De Meersman 
wrote:

>
>
> - Original Message -
> > From: "Walter Heck" 
> > Subject: Re: Which replication solution should I choose?
> >
> > If you happen to be at the Percona Live conference next week in London
> I'm
> > speaking about Galera in a high performance setup as well.
>
>
> Ooo, very interested, especially if you're going to be talking about the
> gotcha's - I'm considering switching our master-master setups out for
> Galera clusters, and it'd be good to have an idea what the side effects are
> going to be :-)
>
>
> --
> Unhappiness is discouraged and will be corrected with kitten pictures.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


-- 
Best regards,

Walter Heck
CEO / Founder OlinData  - Open Source
Training & Consulting

Check out our upcoming trainings 


Re: Which replication solution should I choose?

2014-10-30 Thread Johan De Meersman


- Original Message -
> From: "Walter Heck" 
> Subject: Re: Which replication solution should I choose?
> 
> If you happen to be at the Percona Live conference next week in London I'm
> speaking about Galera in a high performance setup as well.


Ooo, very interested, especially if you're going to be talking about the 
gotcha's - I'm considering switching our master-master setups out for Galera 
clusters, and it'd be good to have an idea what the side effects are going to 
be :-)


-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql