Re: Why does the limit use the early row lookup.

2012-04-24 Thread Jan Steinman
On 24 Apr 12, at 15:57, mysql-digest-h...@lists.mysql.com wrote: > From: shawn green > > > On 4/22/2012 11:18 PM, Zhangzhigang wrote: >> Why does not the mysql developer team to do this optimization? > > When the Optimizer is told to sort a result set in the order determined > by a random val

RE: Why does the limit use the early row lookup.

2012-04-24 Thread Rick James
: RE: Why does the limit use the early row lookup. > > > If you are doing Pagination via OFFSET and LIMIT -- Don't. Instead, > > remember where you "left off". > > (More details upon request.) > > Thanks for your answer. > > Can you tell us the be

RE: Why does the limit use the early row lookup.

2012-04-23 Thread Zhangzhigang
eft off"? --- 12年4月24日,周二, Rick James 写道: > 发件人: Rick James > 主题: RE: Why does the limit use the early row lookup. > 收件人: "张志刚" , "mysql@lists.mysql.com" > > 日期: 2012年4月24日,周二,上午2:54 > InnoDB or MyISAM? > PRIMARY KEY (id) is a separate index in My

RE: Why does the limit use the early row lookup.

2012-04-23 Thread Rick James
ort is nearly Order(1), and the memory is only slightly more than the cost of 10 rows. > -Original Message- > From: shawn green [mailto:shawn.l.gr...@oracle.com] > Sent: Monday, April 23, 2012 5:52 AM > To: mysql@lists.mysql.com > Subject: Re: Why does the limit use the ea

RE: Why does the limit use the early row lookup.

2012-04-23 Thread Rick James
y to avoid scanning 110 rows of something (data or index). If you are doing Pagination via OFFSET and LIMIT -- Don't. Instead, remember where you "left off". (More details upon request.) You can trick MySQL into doing "late row lookup" via a "self join": SELECT

Re: Why does the limit use the early row lookup.

2012-04-23 Thread shawn green
On 4/22/2012 11:18 PM, Zhangzhigang wrote: > Why does not the mysql developer team to do this optimization? > > --- 12年4月20日,周五, Reindl Harald 写道: > >> ... >> >> because the mysql optimizer until now is really >> bad in many situations - order by rand() makes a >> temporary table wil ALL data as

Re: Why does the limit use the early row lookup.

2012-04-22 Thread Zhangzhigang
Why does not the mysql developer team to do this optimization? --- 12年4月20日,周五, Reindl Harald 写道: > 发件人: Reindl Harald > 主题: Re: Why does the limit use the early row lookup. > 收件人: mysql@lists.mysql.com > 日期: 2012年4月20日,周五,下午3:50 > > > Am 20.04.2012 04:29, schrieb 张志刚:

Re: Why does the limit use the early row lookup.

2012-04-20 Thread Reindl Harald
ld [mailto:h.rei...@thelounge.net] >> Sent: Friday, April 20, 2012 12:50 AM >> To: mysql@lists.mysql.com >> Subject: Re: Why does the limit use the early row lookup. >> >> >> >> Am 20.04.2012 04:29, schrieb 张志刚: >>> My point is that the limit can

RE: Why does the limit use the early row lookup.

2012-04-20 Thread Rick James
lto:h.rei...@thelounge.net] > Sent: Friday, April 20, 2012 12:50 AM > To: mysql@lists.mysql.com > Subject: Re: Why does the limit use the early row lookup. > > > > Am 20.04.2012 04:29, schrieb 张志刚: > > My point is that the limit can use late row lookup: lookup rows af

Re: Why does the limit use the early row lookup.

2012-04-20 Thread Reindl Harald
Am 20.04.2012 04:29, schrieb 张志刚: > My point is that the limit can use late row lookup: lookup rows after > checking indexes to optimize the select speed. > > But the mysql optimizer do it with the early row lookup: lookup all rows > before checking indexes when the one fetch c

[OT] Relocation lookup

2009-10-01 Thread Rakotomandimby Mihamina
Hi all, Given the Social and Political reality in my country (Madagascar), I am obliged to look for a relocation. This is my public profile: http://www.linkedin.com/in/mihaminarakotomandimby Would you be aware of a position I could fit in? Thank you. -- Architecte Informatique chez Blueli

Re: Creating / Lookup Users For Database

2009-04-22 Thread Uma Bhat
Carlos, 1) To list the users having access to a database, mysql> SELECT user,host from mysql.db where db = "**"; In your case that would be mysql> SELECT user,host from mysql.db where db = "*cal*"; 2) To grant access to a *NEW *user, you can use GRANT statement along with IDENTIFIED BY clause,

Re: Creating / Lookup Users For Database

2009-04-22 Thread George Larson
On Wed, Apr 22, 2009 at 3:11 PM, Carlos Williams wrote: > On Wed, Apr 22, 2009 at 3:04 PM, Carlos Williams wrote: >> Now I did create that new database called 'forums' and would like to >> create a new user who has access only to that specific database from >> localhost. I can't seem to find the

Re: Creating / Lookup Users For Database

2009-04-22 Thread Carlos Williams
On Wed, Apr 22, 2009 at 3:04 PM, Carlos Williams wrote: > Now I did create that new database called 'forums' and would like to > create a new user who has access only to that specific database from > localhost. I can't seem to find the command via Google on how I create > the user and grant access

Re: Creating / Lookup Users For Database

2009-04-22 Thread Carlos Williams
On Wed, Apr 22, 2009 at 2:45 PM, George Larson wrote: >>> Is this what you mean? > > SELECT * FROM user; Yes. That was exactly what I was looking for. Thank you for that info. Still learning these commands so pardon my ignorance. Now I did create that new database called 'forums' and would like

Re: Creating / Lookup Users For Database

2009-04-22 Thread George Larson
On Wed, Apr 22, 2009 at 2:40 PM, Carlos Williams wrote: > On Wed, Apr 22, 2009 at 2:40 PM, Carlos Williams wrote: >> On Wed, Apr 22, 2009 at 11:53 AM, Brent Baisley wrote: >>> All user information is stored in the mysql database. If you want to >>> see a list of users that have been created, que

Re: Creating / Lookup Users For Database

2009-04-22 Thread Carlos Williams
On Wed, Apr 22, 2009 at 2:40 PM, Carlos Williams wrote: > On Wed, Apr 22, 2009 at 11:53 AM, Brent Baisley wrote: >> All user information is stored in the mysql database. If you want to >> see a list of users that have been created, query the user information >> table. >> select User, Host from my

Creating / Lookup Users For Database

2009-04-22 Thread Carlos Williams
This seems to be a simple beginer question for MySQL and I have searched online but I wanted to ask before I really confuse myself. I have MySQL running on Linux and right now I have created a 2nd production database: mysql> show databases; +-+ | Database

Re: Lookup record with same id and match it's status

2009-01-11 Thread Baron Schwartz
gt; 20081224001, A, B, NULL, READ, 2008-12-24 01:01:03 > My question is if I want to lookup 20081224001 and expect the result to > be like this: > transaction id, from, to, message, sent, received > 20081224001, A, B, stest, 2008-12-24 01:01:01, 2008-12-24 01:01:03 > How to bu

Lookup record with same id and match it's status

2008-12-23 Thread sangprabv
record. So the records should be something like this: transaction_id, from, to, message, status, insertdate 20081224001, A, B, stest, SENT, 2008-12-24 01:01:01 20081224001, A, B, NULL, READ, 2008-12-24 01:01:03 My question is if I want to lookup 20081224001 and expect the result to be like this

Re: Lookup tables

2008-08-01 Thread Perrin Harkins
oring the value directly in the column, with the lookup table just used for enforcing a constraint on legal values. - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Lookup tables

2008-08-01 Thread Rudolf Lippan
> > If by "better" you mean "faster" then yes, it probably is marginally > faster. It would be simpler to just use the actual values you want in > the lookup columns rather than integers. It might slow down writes a > little (since the foreign key lookup would

Re: Lookup tables

2008-07-31 Thread Perrin Harkins
e simpler to just use the actual values you want in the lookup columns rather than integers. It might slow down writes a little (since the foreign key lookup would be a string instead of an integer) but it eliminates joins for reading. The downside is duplicated data. - Perrin -- MySQL General Mail

Lookup tables

2008-07-31 Thread Chris W
This is really a MySQL and php question since one of the two options require programming. Of course I don't think the result would be different in a different programming language. I use lookup tables a lot. I have had between 5 to 10 lookup tables for one table of data. Normall

Re: Multi Lookup Table Joins

2007-09-30 Thread Rob Wultsch
lumn in a tale that is an > integer ID used to join to a lookup table. If there is only one Join to > do it is to do something like this > > SELECT t.data, l.group > FROM table t JOIN lookuptable l USING (groupID) > WHERE whatever > > however if I need to join more than

Re: Multi Lookup Table Joins

2007-09-30 Thread Baron Schwartz
Chris W wrote: I often find that I have more than one column in a tale that is an integer ID used to join to a lookup table. If there is only one Join to do it is to do something like this SELECT t.data, l.group FROM table t JOIN lookuptable l USING (groupID) WHERE whatever however if I

Multi Lookup Table Joins

2007-09-30 Thread Chris W
I often find that I have more than one column in a tale that is an integer ID used to join to a lookup table. If there is only one Join to do it is to do something like this SELECT t.data, l.group FROM table t JOIN lookuptable l USING (groupID) WHERE whatever however if I need to join

RE: Disable DNS reserve lookup for auth

2007-02-22 Thread Gary W. Smith
> We have 4 development servers that are fairly configured the same way. > We have an admin account on each server using %" for the hostname. > This > works on 3 of the 4 servers. The 4th server seems to do a lookup and > since the client machine (i.e. my workstation

Disable DNS reserve lookup for auth

2007-02-22 Thread Gary W. Smith
We have 4 development servers that are fairly configured the same way. We have an admin account on each server using %" for the hostname. This works on 3 of the 4 servers. The 4th server seems to do a lookup and since the client machine (i.e. my workstation) isn't specifically specif

Re: Lookup Table Question...

2006-08-10 Thread Dan Buettner
Mark, can you provide a sample of a query you're currently using to retrieve data from this table / joining on this table? Also, how big is this table? It may not be worth your time to change things around as this is a very simple structure and should remain speedy even if it grows pretty large.

Lookup Table Question...

2006-08-10 Thread Mark Donovan
hello all this is my first post...I haven't been able to find a way to half my table size through a primary key relationship that can exist once. If I want to relate "person1 (id = 4)" to "person2 (id = 1)" I have have had good success with the following table below. However, if i

Alternate forms of given name, lookup table

2006-04-26 Thread 2wsxdr5
this lookup table and I am trying get Bob in my table A to match with Robert in my table B what would the query look like. Just to start here is kind of what I have been doing so far... SELECT a.FName a.MName, a.LName, a.Street, a.City, a.State, a.ZIP, a.Phone FROM TableA as a, TableB as b WHERE

Re: Data Design : Numeric or keyword lookup values?

2005-05-09 Thread SGreen
news <[EMAIL PROTECTED]> wrote on 05/06/2005 06:08:18 PM: > hi, > When designing data it is common to have lookup tables such > animal_type : dog=1, cat=2,bird=3 etc > > And then in other tables to refer to animals by their number 1, 2 > or 3. This is memory and >

Re: Data Design : Numeric or keyword lookup values?

2005-05-09 Thread zzapper
On Sat, 7 May 2005 09:35:21 +0100, wrote: >One issue you have to consider is how the data is entered. If the user >selects from a drop down list then this is ok but you need to plan how the >drop down list is compiled. If not then you need to thinks about spelling >errors, language issues etc.

RE: Data Design : Numeric or keyword lookup values?

2005-05-07 Thread Charles Walmsley
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of zzapper Sent: 06 May 2005 23:08 To: mysql@lists.mysql.com Subject: Data Design : Numeric or keyword lookup values? hi, When designing data it is common to have lookup tables such animal_type : dog=1, cat=2,bird=3 etc And then in other

Data Design : Numeric or keyword lookup values?

2005-05-06 Thread zzapper
hi, When designing data it is common to have lookup tables such animal_type : dog=1, cat=2,bird=3 etc And then in other tables to refer to animals by their number 1, 2 or 3. This is memory and presumably speed efficient. Howver not much fun for humans who are "reading/debugging"

Re: lookup tables, populating automatically

2004-05-19 Thread SGreen
cc: <[EMAIL PROTECTED]> Fax to: 05/18/2004 08:51 Subject: lookup

lookup tables, populating automatically

2004-05-18 Thread Taylor Lewick
I asked a question earlier about how to handle lookup tables, I think this is a little more clear as to what I was trying to ask. if I want to relate a contact to an organization, I know I can create a table that contains contact_ids and org_ids. But, how do I enter that information gracefully

New install, hostname and other lookup isues

2004-01-31 Thread Scott Haneda
I just learned that MySql 4 comes installed on OS X server. There is this little admin app that allows you to enable it, I was not used to this, but it seemed to work, I was able to login and see the 'test' table. I then proceeded to set up the password. /usr/local/mysql/bin/mysqladmin -u root pa

Re: ip range lookup

2003-10-04 Thread Jose Miguel
gt; Sent: Sunday, October 05, 2003 1:08 AM Subject: ip range lookup > I have a table that maps ip-ranges to countries: each record consists of 2 > ip numbers (unsigned int's) and the country in which all ip's between those > two are located. > How should I setup the table t

Re: ip range lookup

2003-10-04 Thread Matt W
Hi Willem, I don't *think* MySQL optimizes BETWEEN like that to use an index. Have you tried this?: SELECT * FROM ipcountry WHERE ip1 >= 123456789 AND ip2 <= 123456789; Matt - Original Message - From: "Willem Bison" Sent: Saturday, October 04, 2003 6:08 PM Sub

ip range lookup

2003-10-04 Thread Willem Bison
I have a table that maps ip-ranges to countries: each record consists of 2 ip numbers (unsigned int's) and the country in which all ip's between those two are located. How should I setup the table to have fast ip lookups ? Making a primary key of the 2 ip's and doing a 'select .. between ip1 and ip

Re: Newbie Question: how to set field a lookup field from another table?

2003-08-29 Thread Antony Dovgal
On Fri, 29 Aug 2003 01:02:57 -0400 (EDT) "Jordan Morgan" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to MySQL. I normally use MS Access but my project needs > MySQL. I'm able to set a field(categoryID) in table A(product) a lookup > field to anot

Newbie Question: how to set field a lookup field from another table?

2003-08-29 Thread Jordan Morgan
Hi, I'm very new to MySQL. I normally use MS Access but my project needs MySQL. I'm able to set a field(categoryID) in table A(product) a lookup field to another table(category) in Access but I can't find anywhere that teaches me how to do that in MySQL. I'm managing

The SET field type vs. a lookup table

2003-08-14 Thread Tim Fountain
Does the FIND_IN_SET() function mentioned in the manual have any performance bonuses over doing a LIKE search for a SET fields? I'm trying to decide between using a SET or a separate lookup table at the moment, but data needs to be searchable and could have a lot of values, so it needs

lookup and reverse_lookup UDF problem

2003-08-11 Thread Bryan Miller
using the CREATE FUNCTION command to add the avaiable UDF's until I get to lookup and reverse_lookup. On these two, I get the following error message: ERROR 1127: Can't find function 'reverse_lookup' in library ERROR 1127: Can't find function 'lookup' in li

Re: Lookup used Version of MySql && MySql Foreign Keys and Referencial Integrity

2003-06-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-28 16:56:13 +0200: > I use mySQL on HP/UX 11.i - unfortunateley I am unable to lookup the > used version. What is the command to do that? (according to mysql.info > it is Version 3.23.42. ) SELECT VERSION(); -- If you cc me or remove the list(s) comple

Lookup used Version of MySql && MySql Foreign Keys and Referencial Integrity

2003-06-28 Thread Vince Veggus
Hello, I use mySQL on HP/UX 11.i - unfortunateley I am unable to lookup the used version. What is the command to do that? (according to mysql.info it is Version 3.23.42. ) Are foreign keys and referencial integrity supported by MySQL Version 3.23.42. ? If yes - why is the second "insert

Re: Mysqld DNS lookup causes crash

2002-10-12 Thread Andrius Armonas
nt: Saturday, October 12, 2002 12:52 AM Subject: Mysqld DNS lookup causes crash > >Description: > Server version 3.23.49-log > Protocol version10 > OS Linux atlas 2.4.18-5smp #1 > > Mysqld two days ago began to crash on accepting non-local mysql connections.

Mysqld DNS lookup causes crash

2002-10-12 Thread andy . ciordia
: Mysqld crashing on DNS lookup >Severity: serious >Priority: medium >Category: mysql >Class: >Release: mysql-3.23.49 (Source distribution) >Server: /usr/bin/mysqladmin Ver 8.23 Distrib 3.23.49, for redhat-linux-gnu on i386 Copyright (C) 2000 MySQL

Re: MySql User Lookup

2002-07-08 Thread Egor Egorov
sajiddalvi, Sunday, July 07, 2002, 8:04:02 PM, you wrote: s> Is there a way to check which my sql user (who has logged into the database) s> has inserted a row in a table? s> I could add a "logged_in_user" column but that seems redundant. Take a look at functions: USER(), SYSTEM_USER(), SESSION_

Re: MySql User Lookup

2002-07-07 Thread Dicky Wahyu Purnomo
Pada Sun, 7 Jul 2002 13:04:02 -0400 "sajiddalvi" <[EMAIL PROTECTED]> menulis : > Is there a way to check which my sql user (who has logged into the database) > has inserted a row in a table? > I could add a "logged_in_user" column but that seems redundant. you can set your mysqld to log all acti

MySql User Lookup

2002-07-07 Thread sajiddalvi
Is there a way to check which my sql user (who has logged into the database) has inserted a row in a table? I could add a "logged_in_user" column but that seems redundant. --- Introducing NetZero Long Distance Unlimited Long Distance only $29.95/ month! Si

Re: Case Insensitivity of queries and record lookup

2002-07-01 Thread Alexander Barkov
binary" argument. If you would like me to send binary.conf file, please let me know. Keith C. Ivey wrote: > On 28 Jun 2002, at 14:27, Mark Hennessy wrote: > > >>I have noticed after migrating my database from mSQL to MySQL that >>queries are providing lookup results in a

RE: LOOKUP

2002-04-18 Thread Gordon
This set of responses is getting away from the original question. The lookup "data type" in Microsoft Access is not a data type at all. It creates a join with another table underneath the surface. If you try to implement this with ENUM and Alter Table you will destroy the existing

RE: LOOKUP

2002-04-17 Thread Andrew Hazen
17, 2002 3:32 PM To: Andrew Hazen; [EMAIL PROTECTED] Subject: RE: LOOKUP Hi, Your solution would work if the set of the values you'll get from one table is primary key.. If it is not a primary key, i.e. allowing duplicate values, then everytime there is an insertion to the table you will ha

RE: LOOKUP

2002-04-17 Thread Gurhan Ozen
ginal Message- From: Andrew Hazen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 1:58 PM To: 'Gurhan Ozen'; 'Simon Tienery'; [EMAIL PROTECTED] Subject: RE: LOOKUP That's what I thought too. A workaround occurs to me though, but I'm not sure if it would

RE: LOOKUP

2002-04-17 Thread Andrew Hazen
That's what I thought too. A workaround occurs to me though, but I'm not sure if it would muck things up. At any point where you make a change to the table you want to reference as the "lookup" (as in Access), you could include another sql command to alter the table wit

RE: LOOKUP

2002-04-17 Thread Gurhan Ozen
or it. Sincerely, Gurhan -Original Message- From: Andrew Hazen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 12:54 PM To: 'Gurhan Ozen'; 'Simon Tienery'; [EMAIL PROTECTED] Subject: RE: LOOKUP Gurhan, I think Simon was looking for a way to make the enum d

RE: LOOKUP

2002-04-17 Thread Andrew Hazen
Gurhan, I think Simon was looking for a way to make the enum dynamic from another table. ?? Andrew Hazen -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 10:22 AM To: Simon Tienery; [EMAIL PROTECTED] Subject: RE: LOOKUP Hi .. You

LOOKUP

2002-04-17 Thread Simon Tienery
told that Access has a data type that does this called lookup, but I only want to use MySQL. I couldn't locate the answer in the manual and I'd appreciate it if someone can explain how this can be achieved / worked around.

Re: Lookup tables and indexing

2002-03-02 Thread Jeff Kilbride
Actually, I've been looking pretty closely at a couple of other tables I wanted to implement as HEAP tables -- and I didn't even think about moving my little lookup tables into HEAP. :) Thanks! --jeff - Original Message - From: "Jeremy Zawodny" <[EMAIL PROTECT

Re: Lookup tables and indexing

2002-03-02 Thread Jeremy Zawodny
On Wed, Feb 27, 2002 at 09:14:51PM -0800, Jeff Kilbride wrote: > > Is there a rule of thumb for small tables and whether they should be > indexed? I have several small, two column lookup tables with few > rows (100-300) and some very small tables (< 10 rows). I don't plan &g

Re: Lookup tables and indexing

2002-03-01 Thread Egor Egorov
ruary 28, 2002, 7:14:51 AM, you wrote: >> >> JK> Is there a rule of thumb for small tables and whether they should be >> JK> indexed? I have several small, two column lookup tables with few rows >> JK> (100-300) and some very small tables (< 10 rows). I don't

Re: Lookup tables and indexing

2002-02-28 Thread Jeff Kilbride
Hi Egor, Thanks for the reply. Does it actually hurt to index them on lower volumes of traffic? Or is it neglible? --jeff - Original Message - From: "Egor Egorov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 28, 2002 8:40 AM Subject: Look

Lookup tables and indexing

2002-02-28 Thread Egor Egorov
Jeff, Thursday, February 28, 2002, 7:14:51 AM, you wrote: JK> Is there a rule of thumb for small tables and whether they should be JK> indexed? I have several small, two column lookup tables with few rows JK> (100-300) and some very small tables (< 10 rows). I don't plan on inde

Lookup tables and indexing

2002-02-27 Thread Jeff Kilbride
Is there a rule of thumb for small tables and whether they should be indexed? I have several small, two column lookup tables with few rows (100-300) and some very small tables (< 10 rows). I don't plan on indexing the very small ones, but what about the others? Thanks, --jeff s

Re: Recursive same-table lookup, operator precedence (?)

2001-09-06 Thread Henning Schroeder
At 22:53 06.09.01, you wrote: >mysql> SELECT receiver_id, associate_of, user_name FROM receivers; >+-+--+-+ >| receiver_id | associate_of | user_name | >+-+--+-+ >| 1 |0 | arnold | >| 2

Re: Recursive same-table lookup, operator precedence (?)

2001-09-06 Thread Adams, Bill TQO
Balazs Szemes wrote: > Hi, > It is a recursive table design, meaning that a person can have a boss. The > boss' id is stored in the associate_of column. Eg. elmer is barney's > associate, barney is boss of elmer, and diana > > Let's say I only know the user_name 'barney', and I would like to sele

Recursive same-table lookup, operator precedence (?)

2001-09-06 Thread Balazs Szemes
Hi, Please help me with a query. I looked in the documentation w/o success. Consider this table: mysql> SELECT receiver_id, associate_of, user_name FROM receivers; +-+--+-+ | receiver_id | associate_of | user_name | +-+--+---

internal lookup tables?

2001-01-16 Thread Joseph McDonald
I find myself having to deal with lookup tables to preserve space and speed up queries. Something like: create table test ( somedate DATE, long_column_id INT UNSIGNED, ); create table longcol_lookup ( long_column_id_id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, long_column CHAR(128