Re: MySQL UUID_SHORT() gives error Out of range value for column

2014-06-21 Thread Roberta Jaskolski
2014/06/20 11:31 +0100, Neil Tompkins I'm using MySQL 5.6.17 on Amazon Web Services RDS and when calling SELECT UUID_SHORT() I'm getting a number bigger than 9223372036854775807. For example the number I get is 12057145185130250250 help uuid_short Name: 'UUID_SHORT' Descriptio

MySQL UUID_SHORT() gives error Out of range value for column

2014-06-20 Thread Neil Tompkins
g a number 12057145185130250250 I get the error MySQL 22003 'MySQL 22003 Out of range value for column '' at row 1' If I run SELECT UUID_SHORT() on our test server which is MySQL 5.6.11 (running on Windows 2008 64x) the result is as follows; 23526798209843216 I changed the colum

Re: Out of range value for column 'datestamp' at row 1

2010-05-10 Thread Prabhat Kumar
Thanks, It worked :) On Mon, May 10, 2010 at 6:25 PM, Jay Ess wrote: > On 2010-05-09 13:29, Prabhat Kumar wrote: > >> INSERT INTO myTable_info (id,range, total_qt, qt_correct, finish_time, >> username, datestamp) VALUES (NULL,'Kumar', '20&#

Re: Out of range value for column 'datestamp' at row 1

2010-05-10 Thread Jay Ess
On 2010-05-09 13:29, Prabhat Kumar wrote: INSERT INTO myTable_info (id,range, total_qt, qt_correct, finish_time, username, datestamp) VALUES (NULL,'Kumar', '20', '17', '111', 'Prabhat','* NOW()');* Last_SQL_Error: Error 'You have

Re: Out of range value for column 'datestamp' at row 1

2010-05-09 Thread Carsten Pedersen
of mysql. Master :5.0.67-log Slave : 5.1.43sp1-enterprise-gpl-advanced-log There is table: CREATE TABLE `myTable_info` ( `id` int(11) NOT NULL auto_increment, `range` varchar(255) NOT NULL, `total_qt` smallint NOT NULL default '0', `qt_correct` smallint NOT NULL

Out of range value for column 'datestamp' at row 1

2010-05-09 Thread Prabhat Kumar
Hi, I have setup replication between 2 servers, on both there is different versions of mysql. Master :5.0.67-log Slave : 5.1.43sp1-enterprise-gpl-advanced-log There is table: CREATE TABLE `myTable_info` ( `id` int(11) NOT NULL auto_increment, `range` varchar(255) NOT NULL, `total_qt

RE: Selecting from the range of serial numbers

2009-07-24 Thread Gavin Towey
WHERE 70 BETWEEN start_sequence AND end_sequence AND 'C' BETWEEN start_batch AND end_batch; Though what you should really do is add a unique auto increment to every symbol, then you only have to do a simple range check. Or use a full relational structure and have a OTM or MTM with

Selecting from the range of serial numbers

2009-07-24 Thread hezjing
Hi My stock serial number format is 1A - 9A, 1B - 9B ... 1Z - 9Z. These stocks are check in to warehouse in different order, so the worker may check in the stocks like 1A - 00100A 9B - 00010C 00051B - 00070B I have a table to keep track the stock check in transa

Re: Index/Range Problem?

2008-06-10 Thread Dave Raven
| >> ++-----+---+---+---+--+-+--+ >> ---+-+ >> | 1 | SIMPLE | log | range | date | date | 4 | >> NULL >> | 45178 | Using where | >> +----+-----+---+---+-

Re: Index/Range Problem?

2008-06-10 Thread Sebastian Mendel
ey | key_len | ref | rows | Extra | ++-+---+---+---+--+-+--+ ---+-+ | 1 | SIMPLE | log | range | date | date | 4 | NULL | 45178 | Using where | ++-+---+---+---+--+-+--+ ---+-+ As you

Re: Index/Range Problem?

2008-06-09 Thread Ananda Kumar
ct_type | table | type | possible_keys | key | key_len | ref > | rows | Extra | > > ++-+---+---+---+--+-+--+ > ---+-+ > | 1 | SIMPLE | log | range | date | date | 4 | NULL > | 45178 | Using where | > > ++

Index/Range Problem?

2008-06-09 Thread Dave
ey | key_len | ref | rows | Extra | ++-+---+---+---+--+-+--+ ---+-+ | 1 | SIMPLE | log | range | date | date | 4 | NULL | 45178 | Using where | ++-+---+---+---+--+-+--+ ---+-+ As you can see in the ab

Re: TO_DAYS Date Range Question

2008-04-24 Thread Sebastian Mendel
David Perron schrieb: Hi Sebastian- Wanted to follow up on this. I figured out the problem. You actually have to use the LEAST & GREATEST operators when comparing multiple values, this statement works perfectly. LEAST(EndDays,Q2EndDays) - GREATEST(Q2StartDays,StartDays) as DaysInQ2, Thank

Re: TO_DAYS Date Range Question

2008-04-23 Thread Sebastian Mendel
David Perron schrieb: Hello Users- I think I have an interesting question with regards to applying a function to date range, I think half of problem solving is explaining it to an audience so please, bear with me. There is a table Orders that has two DATE columns, StartDate and EndDate. The

TO_DAYS Date Range Question

2008-04-23 Thread David Perron
Hello Users- I think I have an interesting question with regards to applying a function to date range, I think half of problem solving is explaining it to an audience so please, bear with me. There is a table Orders that has two DATE columns, StartDate and EndDate. The range of dates can vary

Out of range value adjusted for column ...

2008-02-17 Thread Amer Neely
| NULL| +--+-+--+-+-++ If I only enter a new movie title, leaving the rest of the fields blank, my script throws an error: Out of range value adjusted for column 'Year' at row 1 My Perl code for the above action: my $

Re: Statement for a date range

2008-01-31 Thread dpgirago
> I have a report that contains a WHERE statement to report on a date range in > Pentaho. > > WHERE > InOut.MOVEMENTDATE >= (CURRENT_DATE - 7) > > I want to show on the report what the first date of this range is. Can > someone help me with this statement? So if the

Statement for a date range

2008-01-31 Thread mike_mcmillan
I have a report that contains a WHERE statement to report on a date range in Pentaho. WHERE InOut.MOVEMENTDATE >= (CURRENT_DATE - 7) I want to show on the report what the first date of this range is. Can someone help me with this statement? So if the last seven days is January 24, 2008

Re: issue about range optimization

2007-12-27 Thread Baron Schwartz
ndition (or two intervals if <> or != is used). > > especially the second sentence : > > An interval can be used as long as it is possible to determine a single key > tuple containing all records that match the condition (or two intervals if <> > or != is used). >

issue about range optimization

2007-12-26 Thread 232160563
n be used as long as it is possible to determine a single key tuple containing all records that match the condition (or two intervals if <> or != is used). (7.2.5.2. Range Access Method for Multiple-Part Indexes in the manual of mysql) the example showed in the manual is : key_part1 = &

Re: Group by time range.

2007-10-30 Thread Peter Brawley
Chris, What I want to do is find all the groups where the inserts all happened with in say 10 seconds. So my group by would be more like.. Perhaps the easiest solution is to make a temp table of datetime ranges from the resultset, then join from and group by those rowIDs. PB - Chr

Re: Group by time range.

2007-10-30 Thread Baron Schwartz
Hi, Chris W wrote: I have the following query... SELECT CreateDate, count( * ) FROM `userprofile` GROUP BY CreateDate It isn't exactly what I want. Records are added to this table in 2 main ways. First people use the web site interface to create records. In this case, records are only added

Group by time range.

2007-10-30 Thread Chris W
I have the following query... SELECT CreateDate, count( * ) FROM `userprofile` GROUP BY CreateDate It isn't exactly what I want. Records are added to this table in 2 main ways. First people use the web site interface to create records. In this case, records are only added by one or 2 people a

Re: numerical range

2006-12-08 Thread Dan Buettner
You could use triggers to check for sane values on fields and rollback if not sane. http://dev.mysql.com/doc/refman/5.0/en/triggers.html You'd need to handle the rollback in your frontend app. Dan On 12/8/06, Christian High <[EMAIL PROTECTED]> wrote: Is it possible to restrict the

numerical range

2006-12-08 Thread Christian High
Is it possible to restrict the range that can be put in a floating point, or other data type that allows decimal numbers. The data being stored will be that of the result of chemical analysis. The result could very well be 2.41however it would never be 24.1 so i want to ensure that a simple typo

Re: finding row with latest date in a range from joined tables in v4.0.26

2006-09-22 Thread Dan Buettner
y first two where statements; r has 6 unique series, p has multiple programmes and s has multiple speakers I'm trying to pick out the latest programme in each series in a date range and include the series full name (prog_name) and speaker full name (spk_name) from the other tables. I'

finding row with latest date in a range from joined tables in v4.0.26

2006-09-22 Thread rc.msn
where statements; r has 6 unique series, p has multiple programmes and s has multiple speakers I'm trying to pick out the latest programme in each series in a date range and include the series full name (prog_name) and speaker full name (spk_name) from the other tables. I've played arou

Re: Searching through an alphabetical range

2006-07-24 Thread Martin Jespersen
an try this: SELECT DISTINCT lastname FROM employee WHERE lastname BETWEEN 'm' AND 'z'; Thanks, ViSolve DB Team. - Original Message - From: "Paul Nowosielski" <[EMAIL PROTECTED]> To: Sent: Friday, July 21, 2006 10:33 PM Subject: Searching through an alpha

Re: Searching through an alphabetical range

2006-07-23 Thread ViSolve DB Team
t: Searching through an alphabetical range Dear All, I need to write a query that searches last names between the ranges of m through z. Is there a way to do this in the query? Thank You, -- Paul Nowosielski Webmaster office: 303.440.0666 ext 219 cel: 303.827.4257 -- MySQL General

RE: Searching through an alphabetical range

2006-07-23 Thread Quentin Bennett
im Lucia Subject: Re: Searching through an alphabetical range Its working fine for me: mysql> SELECT DISTINCT email_address FROM mailing_list WHERE marketing_list LIKE 'Y' AND last_name >= 'm' AND last_name <= 'z'; 26371 rows in set (1.00 sec) Thank You, -- Paul

Re: Searching through an alphabetical range

2006-07-21 Thread Paul Nowosielski
+-+ > > | 'seal' >= 'm' AND 'seal' <= 'z' | > > +-+ > > | 1 | > > +-+ > 1 row in set (0.00 sec) > > mysql> > > '

RE: Searching through an alphabetical range

2006-07-21 Thread Tim Lucia
--+ | 1 | +-+ 1 row in set (0.00 sec) mysql> 'zz' will probably do the trick, though. Tim > -Original Message- > From: Paul Nowosielski [mailto:[

Re: Searching through an alphabetical range

2006-07-21 Thread Paul Nowosielski
I have the solution: SELECT DISTINCT email_address FROM mailing_list WHERE last_name >= 'm' AND last_name <= 'z' Thank you, -- Paul Nowosielski Webmaster On Friday 21 July 2006 11:03, Paul Nowosielski wrote: > Dear All, > > I need to write a query that searches last names between the range

Searching through an alphabetical range

2006-07-21 Thread Paul Nowosielski
Dear All, I need to write a query that searches last names between the ranges of m through z. Is there a way to do this in the query? Thank You, -- Paul Nowosielski Webmaster office: 303.440.0666 ext 219 cel: 303.827.4257 -- MySQL General Mailing List For list archives: http://lists.mysql

Re: Optimizing range search with two-table ORDER BY

2006-05-12 Thread sheeri kritzer
looks like: *** 1. row *** id: 1 select_type: SIMPLE table: cwGroup type: range possible_keys: quotation_id,stripped_cw key: stripped_cw key_len: 101 ref: NULL rows: 8489 Extra: Using wh

Optimizing range search with two-table ORDER BY

2006-05-08 Thread Jesse Sheidlower
Is there any way to optimize a range query that includes an ORDER BY with keys from two different tables? I'm running MySQL 4.1.18 on FreeBSD. I've been struggling with some queries that are _incredibly_ slow--from 1-5 minutes on slowish but decent hardware. When I try versions without

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-24 Thread Adam Wolff
Well, I hadn't known about the spatial features of MySQL. If you're ok using vendor extensions then that definitely looks like the way to go: http://dev.mysql.com/doc/refman/5.0/en/gis-introduction.html A On Apr 24, Nick Hill wrote: > Hello Adam > > Adam Wolff wrote: > > Actually runs through

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-24 Thread Nick Hill
Hello Adam Adam Wolff wrote: Actually runs through the table four times instead of twice, and maybe can't even use the index for the whole query. Assuming my results are not typical of MySQL query times, this would explain the sqrt() relationship of returned rows to query time. I have tried

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Nick Hill
current large data sets if data will be spread across different physical drives, but not with regular range lookups that you're doing). It will only help with inserts. Assuming even distribution, selecting a table amongst 1000 will only take a few ms while 2^log10(1000) gives an 8 fold improvem

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Alexey Polyakov
ll (well, it may help on scans with concurrent large data sets if data will be spread across different physical drives, but not with regular range lookups that you're doing). It will only help with inserts. > Given that there is such a strong relationship between the number of > records

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Adam Wolff
returned. If all records we are > > matching > > are under a single node or under a small number of nodes in the index tree, > > perhaps there is some way of telling the database engine to ignore the rest > > of > > the index tree. > > > > Could this work, o

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Adam Wolff
ex tree, > perhaps there is some way of telling the database engine to ignore the rest of > the index tree. > > Could this work, or am I misunderstanding how the index tree works? Are there > existing optimisations which can de-couple the relationship between number of > records and que

Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Nick Hill
electing are within a small range? Background information: We can boil all this down to a mathematical relationship where query1 selects s number of records from r records dataset and query2 selects b number of records from c records dataset Tquery1 is time to execue query 1 and Tquery2 is tim

Re: problem with excluded days in date range query.

2006-02-03 Thread Peter Brawley
Paul, If there are no data for a particular day, it is not included. Is there a way to include all days even if the result is 0? I saw an example that included another table with all dates and an inner join but that seems a little clunky. In SQL, enumerating data you don't have requires some

Re: problem with excluded days in date range query.

2006-02-03 Thread sheeri kritzer
Database software is not a calendar. The data you put in is the data you get out. If the day is never put in, you'll never get it out. You need to have some data source that has all the days in it, like an external table, if you want to be able to retrieve that data. Otherwise, you could do it

problem with excluded days in date range query.

2006-02-03 Thread Paul Halliday
I have the following query: select count(*) as cnt, date(timestamp) as day from table where date_sub(curdate(),interval 14 day) <= timestamp group by day; If there are no data for a particular day, it is not included. Is there a way to include all days even if the result is 0? I saw an example th

Re: Out of Range value adjusted?

2006-02-03 Thread Gleb Paharenko
,'19990731','\"Orig Bill > £728.50\"',364.68,'A',17.50); > > The table columns are set to > char(12),date,char(1),date,char(40),decimal(12,2),char(1),decimal(3,2). The > table is MyISAM. > > There error produced on the pure version 5 in

Re: Out of Range value adjusted?

2006-02-02 Thread SGreen
iption,BillAmount,VatCode, > VatRate) > VALUES > ('1234#6','19991016','C','19990731','\"Orig Bill > £728.50\"',364.68,'A',17.50); > > The table columns are set to > char(12),date,char(1),date,char(40),decima

Out of Range value adjusted?

2006-02-02 Thread Kerry Frater
27;A',17.50); The table columns are set to char(12),date,char(1),date,char(40),decimal(12,2),char(1),decimal(3,2). The table is MyISAM. There error produced on the pure version 5 installation is: "Out of Range value adjusted for column VATRate at row 1" and then quits. I have let th

RE: Changing range of identity column for future inserts

2005-11-15 Thread Dan Buettner
To: mysql@lists.mysql.com Subject: Changing range of identity column for future inserts Date: Tue, 15 Nov 2005 08:50:03 -0600 I would like to change one of my tables so that future inserts use a higher range of numbers for the primary key values. I have a table 'event' with column: id i

Re: Changing range of identity column for future inserts

2005-11-15 Thread Michael Stassen
mel list_php wrote: From: Dan Buettner <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject: Changing range of identity column for future inserts Date: Tue, 15 Nov 2005 08:50:03 -0600 I would like to change one of my tables so that future inserts use a higher range of numbers for the p

RE: Changing range of identity column for future inserts

2005-11-15 Thread mel list_php
, melanie From: Dan Buettner <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject: Changing range of identity column for future inserts Date: Tue, 15 Nov 2005 08:50:03 -0600 I would like to change one of my tables so that future inserts use a higher range of numbers for the primary key value

Changing range of identity column for future inserts

2005-11-15 Thread Dan Buettner
I would like to change one of my tables so that future inserts use a higher range of numbers for the primary key values. I have a table 'event' with column: id int unsigned not null auto_increment primary key Currently new records are going into the table with id column valu

Re: Optimal index for date range query with order by using index for sort???

2005-10-24 Thread sheeri kritzer
Is the DATE field a timestamp column? What's your schema? What's your primary key? I ask this because the real question is, "is it safe to assume that new entries are for the current day it is inserted?" If the answer to that question is yes, you can use an id field (or an existing one) to find

Optimal index for date range query with order by using index for sort???

2005-10-24 Thread Kevin Burton
OK. I need help with the following query: SELECT * FROM PRODUCT WHERE DATE > ? ORDER BY PRICE; Basically find products created since a given date and order by prices. I could put an index of DATE, PRICE but it will have to resort to a filesort since DATE isn't a constant value. I was thin

Re: determing number of Tuesdays within a date range

2005-04-28 Thread Peter Brawley
James, >I need to figure out how many Tuesdays are contained >within 1/1/2004 - 5/1/2004, and I need to come up with >a result where I know how many of each day of the week >is within that date range. Supposing a table named tbl and datetime columns named d1 and d2, something li

re: determing number of Tuesdays within a date range

2005-04-28 Thread James Black
Tuesdays are contained within 1/1/2004 - 5/1/2004, and I need to come up with a result where I know how many of each day of the week is within that date range. I am hoping someone may have a solution, as, once I know the number of Tues then I can state the average number of sessions on a Tuesday at

Re: Dates range query

2005-01-04 Thread Wolfram Kraus
Brian Menke wrote: Hi everyone, I've always had a challenge working with dates. I'm building an app that needs to query a range of dates. I'm using ASP (for the first time, I usually write in Java). Anyway my date column uses the -00-00 format, which I think is the default

Dates range query

2005-01-04 Thread Brian Menke
Hi everyone, I've always had a challenge working with dates. I'm building an app that needs to query a range of dates. I'm using ASP (for the first time, I usually write in Java). Anyway my date column uses the -00-00 format, which I think is the default format? Is it? I&#x

Re: Date range with empty rows (Was: Intra-table join)

2004-10-14 Thread SGreen
I have the same issue (missing dates) with my graphing widget, too. I worked around my problem by using script to create a temp table that contains all of the dates that cover the range of dates I want to chart then left join the data tables to my temp table. Sure it's a small memory load

Re: Date range with empty rows (Was: Intra-table join)

2004-10-14 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Partap Davis <[EMAIL PROTECTED]> writes: > I'm graphing the data from this query using dates on the x axis. The > input to my graph module (GD::Graph) requires a constant-length list. > So if any days in my selection range have no data,

Date range with empty rows (Was: Intra-table join)

2004-10-13 Thread Partap Davis
from this query using dates on the x axis. The input to my graph module (GD::Graph) requires a constant-length list. So if any days in my selection range have no data, I need to fill the space with an empy value. For example, say my date range is '2004-10-01' to '2004-10-05

select range of matched word in text field

2004-09-28 Thread M.E. Koch
hello, I wonder if it is possible to match a word like with instr() and get as a result just 10 words bevor and ten words after the matched word. (like google presents the matched query) I would need a select with a replacement and a fitting where clause which could be done with isset. I have is

Re: Date Range

2004-09-27 Thread Dirk Bremer \(NISC\)
- Original Message - From: <[EMAIL PROTECTED]> To: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 14:30 Subject: Re: Date Range > I think you are very close but you are missing the LAST day of each mont

Re: Date Range

2004-09-27 Thread SGreen
er \(NISC\)" <[EMAIL PROTECTED]> wrote on 09/27/2004 03:18:46 PM: > - Original Message - > From: <[EMAIL PROTECTED]> > To: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, September 27, 2004 11:40 > S

Re: Date Range

2004-09-27 Thread Dirk Bremer \(NISC\)
- Original Message - From: <[EMAIL PROTECTED]> To: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 11:40 Subject: Re: Date Range > To compute the date range for "two months ago". (if the curre

Re: Date Range

2004-09-27 Thread Paul DuBois
ROTECTED]> >Cc: <[EMAIL PROTECTED]> >Sent: Monday, September 27, 2004 11:40 >Subject: Re: Date Range > > >> I see that you are on 4.0.18 so you can't use many of the new date >> functions (4.1.1+) but has to be an easier way. Let's try thi

Re: Date Range

2004-09-27 Thread Paul DuBois
At 12:57 -0500 9/27/04, Dirk Bremer (NISC) wrote: - Original Message - From: <[EMAIL PROTECTED]> To: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 11:40 Subject: Re: Date Range I see that you are on 4.0.18

Re: Date Range

2004-09-27 Thread Dirk Bremer \(NISC\)
> Whether he needs semicolons depends on which tool he is using to execute > his statements. If he is using the MySQL client or any of several other > tools, I agree. If he is going through an ODBC connection, he doesn't need > them. (At least my 3.52.x drivers can't accept more than one statement

Re: Date Range

2004-09-27 Thread SGreen
MAIL PROTECTED]> > >Sent: Monday, September 27, 2004 11:40 > >Subject: Re: Date Range > > > > > >> I see that you are on 4.0.18 so you can't use many of the new date > >> functions (4.1.1+) but has to be an easier way. Let's try this for

RE: SELECT a percentage range of a given value

2004-09-22 Thread Stembridge, Michael
Ah, this is not as complex as I imagined. Thanks! > -Original Message- > From: gerald_clark [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 22, 2004 4:52 PM > To: Stembridge, Michael > Cc: [EMAIL PROTECTED] > Subject: Re: SELECT a percentage range of a given

Re: SELECT a percentage range of a given value

2004-09-22 Thread gerald_clark
SELECT * FROM test WHERE bpm < ( 100 * 1.08 ) AND bpm > (100*.92) Stembridge, Michael wrote: Hello, I have a music database containing song BPM (Beats Per Minute) data values stored as FLOAT. I need to pull a range of BPM values based on a user-supplied integer. The range should pu

Re: SELECT a percentage range of a given value

2004-09-22 Thread mos
At 03:11 PM 9/22/2004, you wrote: Hello, I have a music database containing song BPM (Beats Per Minute) data values stored as FLOAT. I need to pull a range of BPM values based on a user-supplied integer. The range should pull all records which are 8% higher and lower than the given integer

SELECT a percentage range of a given value

2004-09-22 Thread Stembridge, Michael
Hello, I have a music database containing song BPM (Beats Per Minute) data values stored as FLOAT. I need to pull a range of BPM values based on a user-supplied integer. The range should pull all records which are 8% higher and lower than the given integer. I tried this query for

Re: Range of timestamp(14)

2004-07-06 Thread Paul DuBois
At 16:43 -0700 7/6/04, Scott Haneda wrote: I can not seem to select a range of timestamp(14) data, something like Select * from foo where added is in the range of 01/01/2004 to 01/25/2004 Well, one problem might be that 01/01/2004 and 01/25/2004 are not dates... You should specify your values in

Re: Range of timestamp(14)

2004-07-06 Thread Patrick
Try BETWEEN I hope this helps. Pat... Patrick Sherrill CocoNet Corporation SW Florida's 1st ISP 825 SE 47th Terrace Cape Coral, FL 33904 - Original Message - From: "Scott Haneda" <[EMAIL PROTECTED]> To: "MySql" <[EMAIL PROTECTED]> Sent: Tuesday,

Range of timestamp(14)

2004-07-06 Thread Scott Haneda
I can not seem to select a range of timestamp(14) data, something like Select * from foo where added is in the range of 01/01/2004 to 01/25/2004 -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com

Re: Range query on datetime with index - any optimization?

2004-05-06 Thread Ken Menzel
| table | type | possible_keys | key | key_len | ref | rows | Extra| +---+---+---+--+-+--+--+-- ----+ | sali | range | saliDate | saliDate | 8 | NULL | 7

Re: Range query on datetime with index - any optimization?

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 10:53:13AM -0400, Pete McNeil wrote: > Hello folks, > > I'm usinng MySQL 4.0.17. > > I have a table something like: > > RuleID int, > GMTBase datetime, > Credited bigint, > ... > > I have an index built on GMTBase. > I have rougly 8 million rows. > > GMTBase stores a da

Re: Range query on datetime with index - any optimization?

2004-05-05 Thread Pete McNeil
ype | possible_keys | key | key_len | ref| rows | Extra | +---+---+---+-+-+++-----+ | RuleHistogram | range | GMTBase | GMTBase | 8 | [NUL

Re: Range query on datetime with index - any optimization?

2004-05-05 Thread Daniel Clark
I wonder if mysql isn't trying to process where GMTBase > DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY) What about doing this date subtracting in PHP and adding the result to the SQL statement. > Hello folks, > > I'm usinng MySQL 4.0.17. > > I have a table something like: > > RuleID int, > GMTBase da

Range query on datetime with index - any optimization?

2004-05-05 Thread Pete McNeil
Hello folks, I'm usinng MySQL 4.0.17. I have a table something like: RuleID int, GMTBase datetime, Credited bigint, ... I have an index built on GMTBase. I have rougly 8 million rows. GMTBase stores a datetime for the top of the hour on a given date. I want to build a summary of the last 2 days

Re: Repost [Fwd: Query Range]

2003-12-08 Thread Michael Stassen
inal Message Subject: Query Range Date: Mon, 08 Dec 2003 11:23:28 -0600 From: Mike Blezien <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Organization: Thunder Rain Internet Publishing To: MySQL List <[EMAIL PROTECTED]> Hello, been trying to figure out the correct SQL query

Repost [Fwd: Query Range]

2003-12-08 Thread Mike Blezien
Sorry.. The query should be: select percentage from table_name where min >= 500.00 and 500.00 <= max; database. Original Message Subject: Query Range Date: Mon, 08 Dec 2003 11:23:28 -0600 From: Mike Blezien <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Organizat

Query Range

2003-12-08 Thread Mike Blezien
Hello, been trying to figure out the correct SQL query to get percentage from a table that list a Min, and Max., price range and the percentage associated to the range. Here is the current data in the table: 1 0.00 4999.00 13.0 2 5000.00 .00 12.5 3 1.00 14999.00 12.0 4 15000.00

Re: Dirt Slow Query On Datetime Range...the saga continues

2003-11-13 Thread Matt W
Matt - Original Message - From: "Gabriel Ricard" Sent: Wednesday, November 12, 2003 10:00 AM Subject: Re: Dirt Slow Query On Datetime Range...the saga continues > In order to make sure of a multi-column index, you have to order the > WHERE clauses in the same order as the

Re: Dirt Slow Query On Datetime Range...the saga continues

2003-11-12 Thread Gabriel Ricard
t you know is a better choice? Thanks again, Michael Shuler -Original Message- From: Michael Shuler [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 3:44 PM To: [EMAIL PROTECTED] Subject: Dirt Slow Query On Datetime Range OK, I give up. To anyone out there who can help me, please

RE: Dirt Slow Query On Datetime Range...the saga continues

2003-11-11 Thread Michael Shuler
[EMAIL PROTECTED] Subject: Dirt Slow Query On Datetime Range OK, I give up. To anyone out there who can help me, please explain why this query runs slower than dirt. The table has about 1,300,000 records in it, which is not supposed to be a big deal for MySQL to deal with. I have tried it with MyISA

Re: Dirt Slow Query On Datetime Range

2003-11-11 Thread Matt W
"Mike Johnson" Sent: Tuesday, November 11, 2003 4:17 PM Subject: RE: Dirt Slow Query On Datetime Range From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Change your query to use BETWEEN rather that <= and >=. > > --ja > > And here is the query: > > > >

RE: Dirt Slow Query On Datetime Range

2003-11-11 Thread Michael Shuler
, November 11, 2003 4:02 PM To: Michael Shuler Cc: [EMAIL PROTECTED] Subject: Re: Dirt Slow Query On Datetime Range The first thing I noticed is that you are using varchar instead of char, why? Unless you have a variable length field like text or blob, you can and should use char. As far as I know, you

RE: Dirt Slow Query On Datetime Range

2003-11-11 Thread Mike Johnson
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Change your query to use BETWEEN rather that <= and >=. > > --ja > > And here is the query: > > > > SELECT COUNT(*) AS CallCount FROM ServiceRADIUSAccounting > WHERE (Realm = > > 'testreal.com') AND (AcctStartTime <= '2003-11-11 15:30:00'

Re: Dirt Slow Query On Datetime Range

2003-11-11 Thread jabbott
Change your query to use BETWEEN rather that <= and >=. --ja On Tue, 11 Nov 2003, Michael Shuler wrote: > OK, I give up. To anyone out there who can help me, please explain why this > query runs slower than dirt. The table has about 1,300,000 records in it, > which is not supposed to be a big

Re: Dirt Slow Query On Datetime Range

2003-11-11 Thread Brent Baisley
The first thing I noticed is that you are using varchar instead of char, why? Unless you have a variable length field like text or blob, you can and should use char. As far as I know, you can't "optimize" InnoDB tables, but you can optimize MyISAM using the analyze command as I recall. Next, ha

Dirt Slow Query On Datetime Range

2003-11-11 Thread Michael Shuler
OK, I give up. To anyone out there who can help me, please explain why this query runs slower than dirt. The table has about 1,300,000 records in it, which is not supposed to be a big deal for MySQL to deal with. I have tried it with MyISAM and then changed it to InnoDB which made it even slower

Re: mysql 'range' query optimization

2003-10-30 Thread gerald_clark
00,000 rows. I have indexes on start, end and (start,end). start and end are unique. 'end' is the primary key. there are supposed to be no overlaps, but there are numbers that are not covered by any range. 'explain' sometimes shows the query using a key, sometimes it doesn't :-

mysql 'range' query optimization

2003-10-30 Thread Johannes Ullrich
; is the primary key. there are supposed to be no overlaps, but there are numbers that are not covered by any range. 'explain' sometimes shows the query using a key, sometimes it doesn't :-(... all of this is kind of 'random'. The table is rather static (<100 updates /

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: Help with SELECT statement for date range

2003-08-19 Thread shaag
Hi, try this: SELECT * FROM your_table WHERE StartDate > NOW() AND EndDate < NOW() > Hello, > > I am having a problem when doing a SELECT. Here is the > scenerio: > > I have a table that has an event StartDate and > EndDate, based on the current Date "NOW()" I need to > know which records are

  1   2   >