Re: Questions about indexing

2003-12-15 Thread Dan Anderson
With such a small database it really boils down to just being tidy; you don't want indexes you're not going to use. Well the database is going to be like 200MB and executing several hundred queries a minute. Thus my concern about speed. Is a P4 w/ 1GB RAM going to choke and die, or will

Questions about indexing

2003-12-14 Thread Dan Anderson
I have a database I'm using for a MMORPG (well, it isn't very MM because I'm something of a noob), and I have a few questions about indexing. I am storing world data in a database. In order to keep everything as swift as possible, I have indexed everything. And I really mean,

perl DBI vs. prepare and execute do

2003-12-06 Thread Dan Anderson
I am using the Perl DBI to connect to a mySQL database. I am using prepare and execute statements to send the query to the database and then execute it. Is there any benefit to doing this versus using do? Thanks, Dan -- MySQL General Mailing List For list archives:

Getting the value of a row you just inserted

2003-10-09 Thread Dan Anderson
Is it possible to SELECT the id (indexed PRIMARY KEY AUTO_INCREMENT) of a row that was just inserted? I'm using PHP, I don't know if that makes a difference? Something like: INSERT INTO foo (bar) VALUES (bar); SELECT last_insert(id) FROM foo; Also, are there any problems with using this in an

Enabling Transactions

2003-09-29 Thread Dan Anderson
I am having a problem in one of my scripts and I need to use transactions to fix it. When I looked it up on the mySQL documentation I found: If you are using transaction-safe tables (like InnoDB or BDB), you can put MySQL into non-autocommit mode with the following command: Does this mean that

Re: hostname

2003-09-21 Thread Dan Anderson
is there a way to find out which host I am connected from? Does the solution have to be a function called within mySQL or would you accept a function called by PHP or Perl? -Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Installation of MySQL

2003-09-21 Thread Dan Anderson
Well you could: (assuming an installation in /usr/local/mysql) # /usr/local/mysql/bin/mysqld --user=mysql /usr/local/mysql/daemonlog /usr/local/mysql/daemonerrorlog But you should probably consult the manual under the installation for an explanation of exactly what the above does. -Dan On

Re: new MySQL Server

2003-09-20 Thread Dan Anderson
I believe I saw something in the mySQL manual about going with a 64 bit system if it was an option because mySQL uses lots of 64 bit data types. So you will see a significant increase in speed with 64 bits versus 32. :: drools at though of Apple w/ 8GB RAM :: :-D -Dan On Sat, 2003-09-20 at

Is there a way to find out if a table exists?

2003-09-19 Thread Dan Anderson
I am trying to make my PHP script autodetect when a table in a mySQL database exists, and when it doesn't, create it. Is there some way to do something like: SELECT * FROM tables WHERE name = table_name; And get a result I could test for truth, and thus run my script? Thanks in advance, Dan

How Fast is COUNT()

2003-09-19 Thread Dan Anderson
I am creating a script which will grab a random row from a mySQL table. Right now the way it is set up each time it calls COUNT(). I was thinking of creating a script and running it as a cron job to update count once every 10 minutes and store the number as an indexed array in the table. It

Re: MySQL 3.23.58 has been released

2003-09-15 Thread Dan Anderson
Wasn't there just an announcement that 4.0.something was released? -Dan On Mon, 2003-09-15 at 12:52, Lenz Grimmer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL 3.23.58, a new version of the popular Open Source/Free Software Database, has been released. It is now

Is it possible to pipe wildcard searches into mySQL?

2003-09-03 Thread Dan Anderson
named only foo? Thanks in Advance, Dan Anderson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

How can I display images from a mySQL Database in a web page?

2003-07-15 Thread Dan Anderson
I have created a BLOB field to store images. Is there any way to embed them within HTML with something like: image start: jpeg /image Thanks in advance, Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: How can I display images from a mySQL Database in a web page?

2003-07-15 Thread Dan Anderson
I think there is a way to insert binary image data in your html, but is there any particular reason you need to do that? Yes, my client's server is running with particularly restrictive PHP safe mode settings and has informed me that dynamic images are a /must have/. :: bangs head against

Storage efficiency of VARCHARs

2003-07-13 Thread Dan Anderson
I am curious about the internal representation of VARCHARS. I cannot find any documentation on it in the mySQL manual. Will a VARCHAR(10) take up less space then a VARCHAR(80), even though they are variable? Thanks in advance, Dan -- MySQL General Mailing List For list archives:

does mySQL support a boolean data type?

2003-07-13 Thread Dan Anderson
I ran a search through the mySQL manual and google and could not find a satisfactory answer. Does mySQL support the declaration of a boolean data type? Currently I am using VARCHAR(6)s with either 'TRUE' or 'FALSE' and would like to cut down on the storage. Thanks in advance, Dan Anderson

Re: does mySQL support a boolean data type?

2003-07-13 Thread Dan Anderson
why don't you use int(1) and set it to 0 or 1? Storage space is an issue because I am designing a very large database for a client. Every byte I save per row will translate into many many megs. So if all I need is a single bit for true or false I want to get as close to that single bit as

Re: derived tables

2003-07-13 Thread Dan Anderson
Are you trying to do this within a programming language? I use similar queries using PHP and have no problem. Although I would write my query like: SELECT tbl_name FROM user_table WHERE user = 'guy'; And then use the result to run a select, update, insert, or whatever -Dan On Sun, 2003-07-13

Is it possible to dump images into a database?

2003-07-09 Thread Dan Anderson
Can anyone point me to a reference on how to insert images into a column in a mySQL database -- or is that not possible? Thanks in advance, Dan Anderson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Cloning a Database

2003-07-08 Thread Dan Anderson
couldn't you dump the database and then use the backup to reload the database? -dan On Tue, 2003-07-08 at 13:58, Boris Villazon wrote: Hi I need to know if is there anyway to clone a existing database (structure and data)? If yes, how can I do this? I looking for a SQL command. Thanks

Re: Typical newbie frustrations

2003-07-08 Thread Dan Anderson
You're using Windows, so I can't make any promises because this is what I'd do under *nix, but when I first set up mySQL if I type: # mysql -h localhost -p The password will be denied, because no password is needed. So I'd type: # mysql -h localhost And get in. This is under the /root/, and