Re: Indexing question

2010-10-06 Thread Jonas Galvez
Thanks Gavin and Joerg, that was very helpful! -- Jonas On Sun, Oct 3, 2010 at 12:44 PM, Joerg Bruehe joerg.bru...@oracle.comwrote: Hi Neil, all! Tompkins Neil wrote: So if you have individual indexes for example field_1, field_2 and field_3 etc and then perform a search like WHERE

Re: Indexing question

2010-10-05 Thread Tompkins Neil
Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Monday, October 04, 2010 8:54 AM To: Joerg Bruehe Cc: [MySQL] Subject: Re: Indexing question Jörg Thanks for the useful reply. Maybe I can EXPLAIN my select queries for you to advise if any changes need to be made

Re: Indexing question

2010-10-04 Thread Joerg Bruehe
Hi! Neil Tompkins wrote: Thanks for your reply. So should we create individual indexes on each field or a multiple column index ?? This question cannot be answered without checking and measuring your installation. The decision whether to create an index is always an act of balancing

Re: Indexing question

2010-10-04 Thread Tompkins Neil
individual indexes on each field or a multiple column index ?? This question cannot be answered without checking and measuring your installation. The decision whether to create an index is always an act of balancing: - If there is an index, the database server can use it to find data records

RE: Indexing question

2010-10-04 Thread Gavin Towey
: Re: Indexing question Jörg Thanks for the useful reply. Maybe I can EXPLAIN my select queries for you to advise if any changes need to be made ? Regards Neil On Mon, Oct 4, 2010 at 3:38 PM, Joerg Bruehe joerg.bru...@oracle.comwrote: Hi! Neil Tompkins wrote: Thanks for your reply. So

Re: Indexing question

2010-10-04 Thread Neil Tompkins
Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Monday, October 04, 2010 8:54 AM To: Joerg Bruehe Cc: [MySQL] Subject: Re: Indexing question Jörg Thanks for the useful reply. Maybe I can EXPLAIN my select queries for you to advise if any changes need to be made

Re: Indexing question

2010-10-03 Thread Tompkins Neil
11:48 AM To: mysql@lists.mysql.com Subject: Indexing question Suppose I wanted to be able to perform queries against three columns of my table: 'user_id', 'product_id' and 'created'. Most of the time I'll just be range-selecting records from the table ordering by 'created'. But I may also

Re: Indexing question

2010-10-03 Thread Joerg Bruehe
Hi Neil, all! Tompkins Neil wrote: So if you have individual indexes for example field_1, field_2 and field_3 etc and then perform a search like WHERE field_1 = 10 AND field_3 = 'abc' This wouldn't improve the search ? You have to create a index for all possible combined field

Re: Indexing question

2010-10-03 Thread Neil Tompkins
Thanks for your reply. So should we create individual indexes on each field or a multiple column index ?? On 3 Oct 2010, at 16:44, Joerg Bruehe joerg.bru...@oracle.com wrote: Hi Neil, all! Tompkins Neil wrote: So if you have individual indexes for example field_1, field_2 and field_3

Re: Indexing question

2010-10-03 Thread Neil Tompkins
Following on from my previous email I have columns containing numbers which are then used in SUM and MIN/ MAX functions should these be indexed too ? On 3 Oct 2010, at 16:44, Joerg Bruehe joerg.bru...@oracle.com wrote: Hi Neil, all! Tompkins Neil wrote: So if you have individual indexes

Indexing question

2010-10-01 Thread Jonas Galvez
Suppose I wanted to be able to perform queries against three columns of my table: 'user_id', 'product_id' and 'created'. Most of the time I'll just be range-selecting records from the table ordering by 'created'. But I may also want to select where 'user_id' = something and 'product_id' in (list,

RE: Indexing question

2010-10-01 Thread Gavin Towey
@lists.mysql.com Subject: Indexing question Suppose I wanted to be able to perform queries against three columns of my table: 'user_id', 'product_id' and 'created'. Most of the time I'll just be range-selecting records from the table ordering by 'created'. But I may also want to select where 'user_id' = something

Question on encoding parameters and binary fields encoding (character_set_connection)

2010-09-16 Thread Filipus Klutiero
Hi, I'm finding the description of character_set_connection unclear. Does this influence the encoding of queries, but not of results? I'm wondering about the effect of connection encoding. Is there documentation on how exactly character set settings affect BLOBs? For example, this is what

Re: newbie question database tables

2010-09-11 Thread Patrice Olivier-Wilson
Thanks all... I got this to work! Much appreciated.. And thanks for patience with a newbie! -- Patrice Olivier-Wilson http://biz-comm.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

newbie question database tables

2010-09-10 Thread Patrice Olivier-Wilson
, but then I couldn't expand later. Reverse is true if I add user_ID to the Topics. So, need an idea how to solve this so it doesn't matter how many new users I keep adding, I can still see who is using the topics. As I said, a newbie question. Thanks much. -- Patrice Olivier-Wilson http://biz

RE: newbie question database tables

2010-09-10 Thread Jerry Schwartz
, 2010 12:09 PM To: mysql@lists.mysql.com Subject: newbie question database tables I'm working on a database that needs to do a few things and getting brain freeze on one part. Scenario: I want to compile a db of articles with these tables: Categories Topics Users Categories cat_ID | cat_name

Re: newbie question database tables

2010-09-10 Thread Patrice Olivier-Wilson
On 9/10/10 12:31 PM, Jerry Schwartz wrote: Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com Thank you! -- Patrice Olivier-Wilson http://biz-comm.com --

Re: question about VIEWS in 5.1.x

2010-09-06 Thread Jangita
On 03/09/2010 9:27 p, Hank wrote: On 02/09/2010 8:30 p, Hank wrote: Simple question about views: Hank, Have you tried running away from the problem :-) by doing... CREATE PROCEDURE `combo`(theid INT) BEGIN (SELECT * FROM table1 WHERE id = theid) UNION (SELECT * FROM

Re: question about VIEWS in 5.1.x

2010-09-06 Thread Jangita
On 03/09/2010 9:26 p, Hank wrote: On Fri, Sep 3, 2010 at 6:23 AM, Jangitajang...@jangita.com wrote: On 02/09/2010 8:30 p, Hank wrote: Simple question about views: Hank, Have you tried running away from the problem :-) by doing... CREATE PROCEDURE `combo`(theid INT) BEGIN (SELECT

Re: question about VIEWS in 5.1.x

2010-09-03 Thread Jangita
On 02/09/2010 8:30 p, Hank wrote: Simple question about views: I have a view such as: create view combo as select * from table1 union select * from table2; Where table1 and table2 are very large and identical and have a non-unique key on field id

Re: question about VIEWS in 5.1.x

2010-09-03 Thread Shawn Green (MySQL)
On 9/3/2010 6:23 AM, Jangita wrote: On 02/09/2010 8:30 p, Hank wrote: Simple question about views: I have a view such as: create view combo as select * from table1 union select * from table2; ... (I've also tried UNION ALL with the same results

Re: question about VIEWS in 5.1.x

2010-09-03 Thread Hank
On 02/09/2010 8:30 p, Hank wrote: Simple question about views: Hank, Have you tried running away from the problem :-) by doing... CREATE PROCEDURE `combo`(theid INT) BEGIN (SELECT * FROM table1 WHERE id = theid) UNION (SELECT * FROM table2 WHERE id = theid

question about VIEWS in 5.1.x

2010-09-02 Thread Hank
Simple question about views: I have a view such as: create view combo as select * from table1 union select * from table2; Where table1 and table2 are very large and identical and have a non-unique key on field id.. when I do a: select * from combo where id

Table design question

2010-08-25 Thread Tompkins Neil
Hi, I'm creating a application which hosts football matches and I want to record the player appearances, goals etc. I was thinking of having a record for each player as follows : appearance_id season_id player_id team_id competition_id appearance goals yellow_card red_card date_played Is this

Re: Indexes larger than RAM (was: Do you know who can answer this question I posted yesterday please?)

2010-07-30 Thread Joerg Bruehe
Hi! I am no InnoDB and tuning expert, so I had intended to stay away from this question. Ok, I'll give some general remarks: Nunzio Daveri schrieb: [[...]] All, I was running slamdb against one of our QA boxes and noticed that the innodb database is 190Gb in size BUT the worrying issue

Re: Indexes larger than RAM (was: Do you know who can answer this question I posted yesterday please?)

2010-07-30 Thread Nunzio Daveri
this question I posted yesterday please?) Hi! I am no InnoDB and tuning expert, so I had intended to stay away from this question. Ok, I'll give some general remarks: Nunzio Daveri schrieb: [[...]] All, I was running slamdb against one of our QA boxes and noticed that the innodb database

Re: Indexes larger than RAM (was: Do you know who can answer this question I posted yesterday please?)

2010-07-30 Thread mos
) and the table structure? Mike At 01:31 PM 7/30/2010, you wrote: Hi! I am no InnoDB and tuning expert, so I had intended to stay away from this question. Ok, I'll give some general remarks: Nunzio Daveri schrieb: [[...]] All, I was running slamdb against one of our QA boxes and noticed

Yet another query question

2010-07-26 Thread Michael Stroh
Hi everyone and thanks in advance for the help. I have a query that I'd like to perform using two tables but am not sure what the best way to perform it short of creating a loop in my code and performing multiple queries. I have two tables. The first table acts as a master table of sorts and

RE: Yet another query question

2010-07-26 Thread Gavin Towey
You'll need to use the technique described here: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html -Original Message- From: Michael Stroh [mailto:st...@astroh.org] Sent: Monday, July 26, 2010 2:50 PM To: MySql Subject: Yet another query question Hi everyone

Re: Yet another query question

2010-07-26 Thread Geert-Jan Brits
Aren't you grouping on IDt? something like ? : select t2.IDt,t2.ID,t2.Num,max(t2.version) from table1 as t1, tabl2 as t2 where t1.num=t2.num and t1.state!='new' group by t2.IDt Cheers, Geert-Jan 2010/7/26 Michael Stroh st...@astroh.org Hi everyone and thanks in advance for the help. I have a

Re: Yet another query question

2010-07-26 Thread Michael Stroh
Yes, sorry, you are correct. I am actually grouping on that other column. I'll take a look at this and see if it works for me. Thanks! Michael On Jul 26, 2010, at 6:10 PM, Geert-Jan Brits wrote: Aren't you grouping on IDt? something like ? : select t2.IDt,t2.ID,t2.Num,max(t2.version)

Select w/ group by question

2010-07-14 Thread Scott Mullen
I'm having trouble formulating a query to gather the following data. I can do this via a script, but now it is more or less just bothering me if there is an easy/efficient way to gather the following data from a single query. Example Tables Products Type Cost Vendor_id

Re: Select w/ group by question

2010-07-14 Thread Peter Brawley
Scott, I would like to obtain the least cost of each product type and its associated vendor. See Within-group aggregates at http://www.artfulsoftware.com/infotree/queries.php. PB - On 7/14/2010 9:25 AM, Scott Mullen wrote: I'm having trouble formulating a query to gather the

Re: Select w/ group by question

2010-07-14 Thread Michael Satterwhite
On Wednesday, July 14, 2010 09:25:22 am Scott Mullen wrote: I'm having trouble formulating a query to gather the following data. I can do this via a script, but now it is more or less just bothering me if there is an easy/efficient way to gather the following data from a single query.

RE: Select w/ group by question

2010-07-14 Thread Martin Gainty
Date: Wed, 14 Jul 2010 10:25:22 -0400 Subject: Select w/ group by question From: smulle...@gmail.com To: mysql@lists.mysql.com I'm having trouble formulating a query to gather the following data. I can do this via a script, but now it is more or less just bothering me

Re: Select w/ group by question

2010-07-14 Thread Scott Mullen
Peter Thanks for the link. I've never run across this page before, but it has tons of useful informationas well as several answers on how to implement what I was trying to do. Ended up going with a solution similar to this example (from the page you referenced): SELECT item, SUBSTR(

AFTER Delete Trigger question

2010-06-18 Thread Kevin Labecot
Hi,Is there a way to update the same table on a delete trigger ?I need to call an UPDATE statement when a delete occurs.Best regards --Kevin Labecot,Innovanticwww.innovantic.frTél. : 05.56.45.60.54

Re: AFTER Delete Trigger question

2010-06-18 Thread João Cândido de Souza Neto
As far as I know, you can´t change data on the same table in triggers. Kevin Labecot ke...@labecot.fr escreveu na mensagem news:4d2ce38b-d169-478b-aebf-c19f20dce...@labecot.fr... Hi, Is there a way to update the same table on a delete trigger ? I need to call an UPDATE statement when a

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 16:30, Dave deal...@gmail.com wrote: SELECT * FROM contacts WHERE state = 'CA' and   name = 'bob' or name = 'sam' or name = 'sara' We begin by asking on the right list (mysql@lists.mysql.com, CC'd by courtesy). You're on the right track though. Try a

Question on http query

2010-06-02 Thread Kandy Wong
Hi, I'd like to know if MySQL server supports http queries? Thanks. Kandy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Question on http query

2010-06-02 Thread Michael Dykman
MySQL is a tradition Relational DataBase System. It underlays something like 80% (somebody correct me if I'm out-of-date here) of the http applications populating the internet. While some RDBMSs offer extensions for RESP-like HTTP implementations, MySQL does not support this directly. It can be

Re: Mysql Schema design Rollback necessity Question

2010-05-25 Thread Martijn Tonies
Hi, I am new to using mysql. I want to prepare an application for my employer. The application will be accessed by staff from as many as 10 different departments such as sales, marketing, admin, finance etc. The users will be using DML commands on the tables. My question has two parts: Part

Re: Mysql Schema design Rollback necessity Question

2010-05-25 Thread Shawn Green
on the tables. My question has two parts: First problem: you are letting your users run direct commands against the database. One of the biggest roles in an application is to isolate and protect the data from stupid user mistakes. Not only should your application filter, validate, and sanitize

Mysql Schema design Rollback necessity Question

2010-05-24 Thread Lightingale
Hi there, I am new to using mysql. I want to prepare an application for my employer. The application will be accessed by staff from as many as 10 different departments such as sales, marketing, admin, finance etc. The users will be using DML commands on the tables. My question has two parts

InnoDB / Transactions question

2010-05-17 Thread Michael Stroh
Hello, I'm currently writing a python program that scans some web directories and then stores some information in a local database. I'm playing with using InnoDB for this application as a test bed for using InnoDB in further applications, but I'm running into a couple issues. When I try to

Re: InnoDB / Transactions question

2010-05-17 Thread Michael Dykman
MyISAM does not support transactions so it is inherently in 'autocommit mode' all the time. You will run into this with any transactional database, be it InnoDB, Falcon, or Oracle and DB2 installations for that matter. For many classes of application, avoiding autocommit and explicitly creating

Re: InnoDB / Transactions question

2010-05-17 Thread Michael Stroh
Thanks for the clarification. Michael On May 17, 2010, at 2:28 PM, Michael Dykman wrote: MyISAM does not support transactions so it is inherently in 'autocommit mode' all the time. You will run into this with any transactional database, be it InnoDB, Falcon, or Oracle and DB2

Re: Count Query question

2010-05-13 Thread Keith Clark
missing? Bob On May 12, 2010, at 8:00 PM, Keith Clark wrote: Hi Bob, No, actually it does not. I'm looking for the count of items. From your query example I only get two rows. This table has over 2 1/2 years of daily sales data. Maybe I'm not stating my question correctly...h

RE: Count Query question

2010-05-13 Thread webmaster
: Keith Clark [mailto:keithcl...@k-wbookworm.com] Sent: 13 May 2010 14:11 To: mysql@lists.mysql.com Subject: Re: Count Query question Bob, Here are a few rows of my data: 17462, 0, '0929998596', '/GraphicNovels/0929998596.jpg', '8.5000', '2010-05-12 19:02:47', '2008-10-01 00:00:00', '2008-10-01 00:00

Count Query question

2010-05-12 Thread Keith Clark
I'm trying to produce a report that will tell me how many products were available with a Quantity0 before a certain date, and have that ordered by date. Table: Date Quantity Result desired DateQuantity Available May 1 5000 May 2 5050 May 3 5075 Thanks, Keith -- MySQL General

Re: Count Query question

2010-05-12 Thread Chris W
With out the table definitions, I'm not sure how anyone could help. Can you send the output of show create table for each of the tables involved in this query? Chris W Keith Clark wrote: I'm trying to produce a report that will tell me how many products were available with a Quantity0

Re: Count Query question

2010-05-12 Thread Keith Clark
Chris, Here is my full table definition: CREATE TABLE `products` ( `products_id` int(15) NOT NULL AUTO_INCREMENT, `products_quantity` int(4) NOT NULL, `products_model` varchar(15) NOT NULL DEFAULT '', `products_image` varchar(64) DEFAULT NULL, `products_price` decimal(15,4) DEFAULT NULL,

Re: Count Query question

2010-05-12 Thread Keith Clark
by products_date_available, counts all records before products_date_available with a products_quantity0. I don't think I'm asking this question properly. For every date in products_date_available in the table, I'd like to know the count of items available with products_quantity0 up until

Re: Count Query question

2010-05-12 Thread Bob Cole
products_date_available with a products_quantity0. I don't think I'm asking this question properly. For every date in products_date_available in the table, I'd like to know the count of items available with products_quantity0 up until that date. So if there are 500 days in the table, there should be 500

Re: Count Query question

2010-05-12 Thread Keith Clark
Hi Bob, No, actually it does not. I'm looking for the count of items. From your query example I only get two rows. This table has over 2 1/2 years of daily sales data. Maybe I'm not stating my question correctly...h Thanks for responding though, greatly appreciated. Keith On Wed

Re: Count Query question

2010-05-12 Thread Bob Cole
data. Maybe I'm not stating my question correctly...h Thanks for responding though, greatly appreciated. Keith On Wed, 2010-05-12 at 19:46 -0500, Bob Cole wrote: Keith: Does this work? SELECT products_date_available, COUNT(products_quantity) FROM products WHERE

4- Question

2010-05-03 Thread Junior Ortis
Hi guys, i have a server with 20GB InnoDb on a single database and i use just one user for its. I use mysql 5.4 1- If i change my SCSI 15k RPM to a SSD i will increase my performance ? 2- What is the fast method to a backup to this InnoDB database ? And the more easy ? And how i restore its ?

Re: 4- Question

2010-05-03 Thread Rob Wultsch
On Sun, May 2, 2010 at 11:50 PM, Junior Ortis jror...@gmail.com wrote: Hi guys, i have a server with 20GB InnoDb on a single database and i use just one user for its. I use mysql 5.4 1- If i change my SCSI 15k RPM to a SSD i will increase my performance ? Umm, maybe. More information is

Theoretical question about innodb autoincrements and binlog mode

2010-04-30 Thread Johan De Meersman
Hey you all, I'm messing about with various settings and parsing the documentation, and my naughty mind saw something that's not very clear in the docs: The InnoDB autoincrement dochttp://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.htmlstates that innodb_autoinc_lock_mode = 2

DATE_FORMAT parameter question

2010-04-09 Thread Martin Gainty
Good Afternoon All following the documentation available at http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html i wish to select a date using DD-MON-YY format but my format of '%y-%b-%d' appears to be incorrect mysql select DATE_FORMAT('11-10-09','%y-%b-%d') from DUAL;

Re: DATE_FORMAT parameter question

2010-04-09 Thread Jo�o C�ndido de Souza Neto
Basicay, your date_format works like: select DATE_FORMAT('YY-MM-DD','%y-%b-%d') from DUAL; Martin Gainty mgai...@hotmail.com escreveu na mensagem news:blu142-w2137936b18ae273dbd6cb1ae...@phx.gbl... Good Afternoon All following the documentation available at

RE: DATE_FORMAT parameter question

2010-04-09 Thread Martin Gainty
To: mysql@lists.mysql.com From: j...@consultorweb.cnt.br Subject: Re: DATE_FORMAT parameter question Date: Fri, 9 Apr 2010 12:56:46 -0300 Basicay, your date_format works like: select DATE_FORMAT('YY-MM-DD','%y-%b-%d') from DUAL; Martin Gainty mgai...@hotmail.com escreveu na mensagem

Re: DATE_FORMAT parameter question

2010-04-09 Thread Carsten Pedersen
If you'll excuse the shameless plug: I once created a tool to help find the exact parameters to use for PHPs date() and MySQLs DATE_FORMAT(). Please see http://bitbybit.dk/php/date_format/ (Yes, it looks horrible. But it works) / Carsten Martin Gainty skrev: Good Afternoon All following

RE: DATE_FORMAT parameter question

2010-04-09 Thread Martin Gainty
question If you'll excuse the shameless plug: I once created a tool to help find the exact parameters to use for PHPs date() and MySQLs DATE_FORMAT(). Please see http://bitbybit.dk/php/date_format/ (Yes, it looks horrible. But it works) / Carsten Martin Gainty skrev: Good Afternoon

Table Length Question...

2010-03-30 Thread Steven Staples
Hi there, I currently store some information about a users daily habits in a table. The table has 4 fields per day, and another 4 fields as the keys. This table, depending on the month, can be from (4 keys + (28 days * 4 fields per day)) fields, to (4 keys + (31 days * 4 fields per day)) fields

RE: Table Length Question...

2010-03-30 Thread Gavin Towey
: Table Length Question... Hi there, I currently store some information about a users daily habits in a table. The table has 4 fields per day, and another 4 fields as the keys. This table, depending on the month, can be from (4 keys + (28 days * 4 fields per day)) fields, to (4 keys + (31 days * 4

Re: Table Length Question...

2010-03-30 Thread Chris W
Your first table layout is horrible, the second one is only marginally better. You should read up on database normalization. I have no idea what id, id2 and type are but since they seem like they are the same for every 'f' and every day, I am pretty sure they all relate directly to the user

Re: Question about DELETE

2010-03-18 Thread Johan De Meersman
only once for all the rows deleted. regards anandkl On Thu, Mar 18, 2010 at 1:21 AM, Price, Randall randall.pr...@vt.edu wrote: Hello, I have a simple question about deleting records from INNODB tables. I have a master table with a few child tables linked via Foreign Key constraints

RE: Question about DELETE

2010-03-18 Thread Price, Randall
] On Behalf Of Johan De Meersman Sent: Thursday, March 18, 2010 6:48 AM To: Ananda Kumar Cc: Price, Randall; [MySQL] Subject: Re: Question about DELETE Given that OP is talking about a single delete statement, I'm gonna be very surprised if he manages to squeeze an intermediate commit

RE: Question about DELETE

2010-03-18 Thread Ian Simpson
is happening multiple times? Thanks, -Randall Price From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: Thursday, March 18, 2010 6:48 AM To: Ananda Kumar Cc: Price, Randall; [MySQL] Subject: Re: Question about DELETE Given that OP is talking about

RE: Question about DELETE

2010-03-18 Thread Price, Randall
: Thursday, March 18, 2010 10:11 AM To: Price, Randall Cc: Johan De Meersman; Ananda Kumar; [MySQL] Subject: RE: Question about DELETE Hi Randall, If you're talking about processes that are taking that long, then running SHOW PROCESSLIST several times during the operation should give you a rough idea

Re: Question about DELETE

2010-03-18 Thread Ananda Kumar
-Original Message- From: Ian Simpson [mailto:i...@it.myjobgroup.co.uk] Sent: Thursday, March 18, 2010 10:11 AM To: Price, Randall Cc: Johan De Meersman; Ananda Kumar; [MySQL] Subject: RE: Question about DELETE Hi Randall, If you're talking about processes that are taking that long

RE: Question about DELETE

2010-03-18 Thread Price, Randall
: Thursday, March 18, 2010 11:15 AM To: Price, Randall Cc: Ian Simpson; Johan De Meersman; [MySQL] Subject: Re: Question about DELETE delete will also cause the undo(before image) to be generated, in case u want to rollback. This will also add up to the delete completion time. After each mass delete

Question about DELETE

2010-03-17 Thread Price, Randall
Hello, I have a simple question about deleting records from INNODB tables. I have a master table with a few child tables linked via Foreign Key constraints. Each table has several indexes as well. My question is: if I delete many records in a single delete statement (i.e., DELETE FROM

Re: Question about DELETE

2010-03-17 Thread Ananda Kumar
AM, Price, Randall randall.pr...@vt.eduwrote: Hello, I have a simple question about deleting records from INNODB tables. I have a master table with a few child tables linked via Foreign Key constraints. Each table has several indexes as well. My question is: if I delete many records

Stored Procedure/Function Question

2010-02-17 Thread Steve Staples
Hi there, I have a WEIRD question, that I can't find an answer too... Here is my stored function: DELIMITER $$ USE `mydatabase`$$ DROP FUNCTION IF EXISTS `SPLIT_STR`$$ CREATE definer=`thisus...@`%` FUNCTION `SPLIT_STR`( X VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHAR(255

Query question

2010-02-06 Thread Jan Steinman
I have three tables that work together. s_product is a list of farm products with an autoincrementing ID. s_product_market_prices is a list of market pricings, obtained from various sources. Each one is dated and refers to exactly one s_product record via its ID. s_product_harvest is a

Query Question

2010-02-01 Thread Dirk Bremer
For the given table: FIELD TYPE COLLATION NULL KEY DEFAULT Extra PRIVILEGES COMMENT - -- -- --- --

Simple Query Question

2009-12-17 Thread Ian
Hi, I am sure there is a simple solution to this problem, I just cant find it :) I have got a table that records views for an article for each blog per day. So the structure is as follows: CREATE TABLE `wp_views` ( `blog_id` int(11) NOT NULL, `post_id` int(11) NOT NULL, `date` date NOT NULL,

Re: Simple Query Question

2009-12-17 Thread Aleksandar Bradaric
Hi Ian, Why do you think something's wrong? Here is my test data and the results of your query: --- mysql SELECT * FROM wp_views; +-+-++---+ | blog_id | post_id | date | views | +-+-++---+ | 1 | 1 | 2009-12-16 |

Re: Simple Query Question

2009-12-17 Thread Ian
Hi, Thanks, I just checked and it was a memcache that was caching the output. See I knew it was a simple solution ;) Thanks for the effort everyone and sorry for wasting time. Regards Ian 2009/12/17 Aleksandar Bradaric leann...@gmail.com Hi Ian, Why do you think something's wrong? Here is

Re: question regarding mysql database location

2009-11-26 Thread nitin mehta
Is mysql the owner of the directories? - Original Message From: Manasi Save manasi.s...@artificialmachines.com To: Johan De Meersman vegiv...@tuxera.be Cc: Waynn Lue waynn...@gmail.com; mysql mysql@lists.mysql.com Sent: Wed, November 25, 2009 8:12:25 PM Subject: Re: question regarding

Re: question regarding mysql database location

2009-11-26 Thread Manasi Save
Hi Johan, It worked perfectly. Thank you so much for this explanation. I am really greatful. -- Best Regards, Manasi Save Artificial Machines Pvt Ltd. On Wed, Nov 25, 2009 at 3:42 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Dear Johan, Need your help again in

Re: question regarding mysql database location

2009-11-26 Thread Manasi Save
...@tuxera.be Cc: Waynn Lue waynn...@gmail.com; mysql mysql@lists.mysql.com Sent: Wed, November 25, 2009 8:12:25 PM Subject: Re: question regarding mysql database location Dear Johan, Need your help again in understanding How mysql reads symlink. As you said below, I have created symlinks

Re: question regarding mysql database location

2009-11-25 Thread Waynn Lue
I fixed this by using symlinks for the directories for the underlying databases. The limit for files is significantly higher than directories. Waynn On 11/24/09, Manasi Save manasi.s...@artificialmachines.com wrote: Hi All, I have asked this question before But, I think I am not able

Re: question regarding mysql database location

2009-11-25 Thread Manasi Save
this question before But, I think I am not able to describe it better. Sorry for asking it again. I have multiple databases but there is a limit on the folders getting created in one folder. I have mysql default directory set as /var/lib/mysql/data. Now, After 32000 folder creation I am not able

Re: question regarding mysql database location

2009-11-25 Thread Waynn Lue
On Wed, Nov 25, 2009 at 12:53 AM, Manasi Save manasi.s...@artificialmachines.com wrote: Thanks Waynn, I could not get your point of using symlinks. Because as per my knowledge symlink will store same data which is there in original directory. and What do you mean by The limit for files is

Re: question regarding mysql database location

2009-11-25 Thread Manasi Save
Well Waynn, In this case I need to move all the existing databases to new location right. Which I don't want to do. Is it possible that I create sym link between two and use both. -- Thanks and Regards, Manasi Save Artificial Machines Pvt Ltd. On Wed, Nov 25, 2009 at 12:53 AM, Manasi Save

Re: question regarding mysql database location

2009-11-25 Thread Johan De Meersman
You don't need to move any databases. Look at this structure: /data/disk1/mysql/db1 (directory) /db2 (directory) /db3 (directory) /db4 (symlink to /data/disk2/mysql/db4) /db5 (symlink to /data/disk2/mysql/db5)

Re: question regarding mysql database location

2009-11-25 Thread Manasi Save
Hi Johan, I am Sorry. If I have complicated the senerio But, this still not fix my purpose. What I want is - From your example :- /data/disk1/mysql/db1 (directory) /db2 (directory) /db3 (directory) /db4 (symlink to /data/disk2/mysql/db4)

Re: question regarding mysql database location

2009-11-25 Thread Krishna Chandra Prajapati
manasi.s...@artificialmachines.com wrote: Hi All, I have asked this question before But, I think I am not able to describe it better. Sorry for asking it again. I have multiple databases but there is a limit on the folders getting created in one folder. I have mysql default directory set

Re: question regarding mysql database location

2009-11-25 Thread Johan De Meersman
On Wed, Nov 25, 2009 at 11:55 AM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi Johan, I am Sorry. If I have complicated the senerio But, this still not fix my purpose. What I want is - From your example :- /data/disk1/mysql/db1 (directory) /db2 (directory)

Re: question regarding mysql database location

2009-11-25 Thread Johan De Meersman
On Wed, Nov 25, 2009 at 12:05 PM, Krishna Chandra Prajapati prajapat...@gmail.com wrote: At a time mysql can point to one data directory. For your task you can have n number of mysql installation with different data directory. After that you can use federated storage engine to perform your

sql query question that puzzles me

2009-11-25 Thread Lech Buszczynski
rows with one query. The question is, which way is better if these requests may be executed a large number of times? I think 1 query is better than 2 but if the table_1 holds a lot of data - resending the whole thing every time (example 2) just to get the one integer value seems like a waste

Re: question regarding mysql database location

2009-11-25 Thread Manasi Save
Thanks Johan, It was really a great help. I'll try to implement it. I dont want to opt for multiple mysql instances option as thats not feasible. I'll get back to you all if it works fine. Thanks again. -- Best Regards, Manasi Save Artificial Machines Pvt Ltd. On Wed, Nov 25, 2009 at 11:55

Re: question regarding mysql database location

2009-11-25 Thread Manasi Save
Dear Johan, Need your help again in understanding How mysql reads symlink. As you said below, I have created symlinks in default mysql directory. and try to read that symlink file as a database. But mysql is not reading that file as Database. Is there any settings which I need to change. Thanks

Re: question regarding mysql database location

2009-11-25 Thread Johan De Meersman
On Wed, Nov 25, 2009 at 3:42 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Dear Johan, Need your help again in understanding How mysql reads symlink. As you said below, I have created symlinks in default mysql directory. and try to read that symlink file as a database. But

question regarding mysql database location

2009-11-24 Thread Manasi Save
Hi All, I have asked this question before But, I think I am not able to describe it better. Sorry for asking it again. I have multiple databases but there is a limit on the folders getting created in one folder. I have mysql default directory set as /var/lib/mysql/data. Now, After 32000 folder

Re: question regarding mysql database location

2009-11-24 Thread Manasi Save
:2048M:autoextend:max:1024M;/var/lib/mysql/data1/ibdata1:2048M:autoextend:max:1024M; Is there any wayout for this? Thanks and Regards, Manasi Save Artificial Machines Pvt Ltd. Hi All, I have asked this question before But, I think I am not able to describe it better. Sorry for asking it again. I have

Re: Optimizing Project Requirements - question

2009-11-22 Thread mos
Mikesz, The best way to approach this is to discover how it has been implemented by others. There is no point re-inventing the wheel. I'm sure you can get some ideas from this web site: http://www.databaseanswers.org/data_models/. and the tutorial at

<    1   2   3   4   5   6   7   8   9   10   >