Search 
You are here: Forums   
Latest PostsMinimize
RE: RSET?
by SteveT
on 08 Feb 2012 08:07 PM
Webmail problem with attachments.
by jshaffer@fslgroup.com
on 08 Feb 2012 02:26 PM
RSET?
by electricpet
on 08 Feb 2012 12:28 PM
RE: Hack attempts seem to be taking down POP3
by SteveT
on 05 Feb 2012 11:46 AM
RE: Hack attempts seem to be taking down POP3
by ub
on 04 Feb 2012 04:52 PM
RE: relaying denied errors
by SteveT
on 02 Feb 2012 10:29 AM
RE: relaying denied errors
by electricpet
on 02 Feb 2012 09:12 AM
RE: relaying denied errors
by SteveT
on 02 Feb 2012 12:57 AM
relaying denied errors
by electricpet
on 30 Jan 2012 10:47 AM
RE: Hack attempts seem to be taking down POP3
by ub
on 25 Jan 2012 07:56 PM
RE: Hack attempts seem to be taking down POP3
by TheOtherBob
on 25 Jan 2012 03:01 PM
RE: Hack attempts seem to be taking down POP3
by ub
on 24 Jan 2012 08:26 PM
RE: I have to migrate mailserver pro > mailserver.net
by vincewarde
on 18 Jan 2012 11:08 AM
I have to migrate mailserver pro > mailserver.net
by vincewarde
on 17 Jan 2012 08:20 PM
RE: How can I set up a DNS server - MySQL
by StephenRussell
on 13 Jan 2012 09:15 AM
RE: How can I set up a DNS server - MySQL
by SteveT
on 12 Jan 2012 01:58 PM
How can I set up a DNS server - MySQL
by StephenRussell
on 12 Jan 2012 05:18 AM
RE: IMAP / iPhone
by Eskissimo
on 06 Jan 2012 07:47 AM

ArGoStuff User to User Support Forums
No indexes in SQL server. Anyone else got same problem?
Last Post 21 Aug 2008 11:13 AM by Steve Topilnycky. 12 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
AuthorMessages
gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
13 Aug 2008 02:06 PM  

Hi

I discovered today that the mail server tables don't have any indexes on them. Even the cache and mailboxdata ones. Anyone else found this to be the case? I can't beleave its been designed without the indexes.

Steve TopilnyckyUser is Offline
Forum Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:1278
Avatar

--
13 Aug 2008 02:25 PM  
Actually, Each table has a RecNo field. That field is the Identity Key for each table and it is indexed.
- - - - - - -
Regards,
Steve Topilnycky
Top Cat Computing
http://www.topcatcomputing.com/
gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
13 Aug 2008 02:34 PM  

Hmm, we I can see its design to be a key (recno field). But there is no index on any of recnos in my database, no fields are set to primary keys. Which is not great to say the least, but there is no indexes on any of the major fields. This is going to have a massive impact on performance when the database grows a little more.

I've just added some indexes on some tables for the time being as a quick.

Just going to have a look in the forums to see if anyone is have any speed issues (could be related).

Steve TopilnyckyUser is Offline
Forum Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:1278
Avatar

--
13 Aug 2008 02:49 PM  
I have not had any issues with it. My MS-SQL not only runs Mail Server, but the back end DB for this and 5 other websites among other things. I have also taxed the server with nearly 2000+ outbound messages, and recieving my normal load plus bounces and the server performed well. There should be a thread in the Site News forum about that project.
- - - - - - -
Regards,
Steve Topilnycky
Top Cat Computing
http://www.topcatcomputing.com/
gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
13 Aug 2008 03:00 PM  
2000 messages was not an issue. 10000 for me became bigger problem (newsletter). It will get much worse as it scales if the indexes are not on.
Steve TopilnyckyUser is Offline
Forum Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:1278
Avatar

--
13 Aug 2008 04:20 PM  
I don't see it as issue, but I am no SQL expert nor the developer and I think a lot depends on the controller logic. I have forwarded your comments to the developer (Archie) and I will let you know what he says.
- - - - - - -
Regards,
Steve Topilnycky
Top Cat Computing
http://www.topcatcomputing.com/
gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
13 Aug 2008 06:16 PM  
Sorry to be so forceful. But I'm telling, not asking. If the mail server is setting up the database with no indexes as standard, it will be a massive problem for anything other than a small database. If there is no index the database has to look at each and every record until it finds the record it wants (not forgetting the records will be out of order). If there is an index, this could be reduced to just a few lookups. On a table with 1000s of records its not an issue. But once your talking about ten of thousands of records or more it will really so down. Don't forgot this compounded by the fact that the database is queried by the mail server many times a second (or it tries to). I've seen instances where a query on a database has been taking minutes reduced to under a second just by adding a index on a field. I've been using Archie's products for quite some years now and he is a great programmer, but if he has missed this it is great mistake. I hope this is corrected.

PS. I would be more than happy to publish details of the indexes I've added or even write a script to add the indexes.
Steve TopilnyckyUser is Offline
Forum Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:1278
Avatar

--
14 Aug 2008 12:24 PM  
I would be more than happy to publish details of the indexes I've added or even write a script to add the indexes.


I would love to see that and the script. I have communicated with Archie and he will be adding it at some point in the future.
- - - - - - -
Regards,
Steve Topilnycky
Top Cat Computing
http://www.topcatcomputing.com/
gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
18 Aug 2008 09:33 PM  
Hi Steve,

The next post I do will included the code to create the indexes.
The indexes are put on just three tables DeliveryQueue, DnsCache, MailboxData.
These tables are the ones with the most records and are 'hit' the most times. Without seeing the code I'm working a little blind but its a good start. With some
of SQL servers query logging I could optimize the database more.

Ideally Primary keys and relationships should be added. But this is really a job for
Archie.

On another note I discovered that if the DnsCache grows very large (in my case it was tens of thousands of rows when I did the newsletter) if the server is stopped and started it hangs on deleting the old records from DnsCache. Even with the index its still struggling. I suspect this is because of an unoptimized query.

I could have a look at how that query is working and maybe offer a solution/ifx if archie is busy.

Glenn

gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
18 Aug 2008 09:33 PM  

/*********************************************************/
/****** Create a Indexes Recno, ******/
/****** NextAttemptTime, ******/
/****** Created, ******/
/****** in DeliveryQueue Table ******/
/*********************************************************/

CREATE NONCLUSTERED INDEX [Recno] ON [dbo].[DeliveryQueue]
(
[RecNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/

CREATE NONCLUSTERED INDEX [NextAttemptTime] ON [dbo].[DeliveryQueue]
(
[NextAttemptTime] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/

CREATE NONCLUSTERED INDEX [Created] ON [dbo].[DeliveryQueue]
(
[Created] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/
/****** Create a Indexes Recno, ******/
/****** DomainName, ******/
/****** RecordType, ******/
/****** Expires, ******/
/****** in DnsCache Table ******/
/*********************************************************/

CREATE NONCLUSTERED INDEX [Recno] ON [dbo].[DnsCache]
(
[RecNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/

CREATE NONCLUSTERED INDEX [DomainName] ON [dbo].[DnsCache]
(
[DomainName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/

CREATE NONCLUSTERED INDEX [RecordType] ON [dbo].[DnsCache]
(
[RecordType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/

CREATE NONCLUSTERED INDEX [Expires] ON [dbo].[DnsCache]
(
[Expires] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/
/****** Create a Indexes Recno, ******/
/****** MailboxID, ******/
/****** in MailboxData Table ******/
/*********************************************************/

CREATE NONCLUSTERED INDEX [Recno] ON [dbo].[MailboxData]
(
[RecNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/

CREATE NONCLUSTERED INDEX [MailboxID] ON [dbo].[MailboxData]
(
[MailboxID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

/*********************************************************/
Steve TopilnyckyUser is Offline
Forum Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:1278
Avatar

--
21 Aug 2008 10:07 AM  
Thanks I will give it a try. As for the DNS Cache, I thought that was changed in one of the earlier releases. Are you using the latest version?
- - - - - - -
Regards,
Steve Topilnycky
Top Cat Computing
http://www.topcatcomputing.com/
gyroscopesUser is Offline
New Member
New Member
Send Private Message
Posts:20

--
21 Aug 2008 11:10 AM  
I'm on v1.0.5.2. I tend to upgrade on more major releases.

If there anything you or archie wants me to look into I try to help. Anything regarding databases I should be able to help. Included triggers, rollbacks, indexes, speed issues etc etc.
Steve TopilnyckyUser is Offline
Forum Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:1278
Avatar

--
21 Aug 2008 11:13 AM  
I will pass it on. Thanks.
- - - - - - -
Regards,
Steve Topilnycky
Top Cat Computing
http://www.topcatcomputing.com/
You are not authorized to post a reply.

Active Forums 4.2
DonationsMinimize

Find our site useful? Make a donation to show your support

Donate

logo_ccMC.giflogo_ccVisa.giflogo_ccDiscover.giflogo_ccAmex.gif

ArGoStuff Supporters

 


News from ArGoSoftMinimize
1 2 3 4 5 6


Mail Server v1.0.8.3
  • Added support of STARTTLS (STLS) command for SMTP, POP3, IMAP, and SMTP relay and delivery, which will allow secure, fully encrypted connections, when possible;
11/6/2011 1:10:34 PM
Mail Server v1.0.8.2
  • Optimized delivery speed. In earlier versions each "tick" which was checking whether messages were in the outbox queue, was picking up only one message at a time. Now it will attempt to pick MaximumAllowedThreads-ActiveDelivery threads messages, which should considerably increase deliver speed;
  • Optimized SEARCH and STATUS IMAP commands. They appear to be used very extensively by Android, and (not that extensively, but still) by iPhone. Now users who use mobile phones to access their IMAP accounts will see considerable improvement;
  • Optimized STORE IMAP command. Before storing of IMAP flags was occuring one message at a time, which seemed to be fine with SQL server, but proved to be slow for SQLite... Now it happens with single SQL call.
10/8/2011 7:59:35 PM
ArGoSoft Mail Server v1.0.8.1
  • Fixed a bug: when using IMAP via Firefox with "When I delete a message, move it to Trash folder" option, marking messages in the trash folder was causing high CPU usage, and was taking some time, making the server pretty much non-responsive. The problem was happening only when using SQLite.
6/6/2011 9:33:36 PM
ArGoSoft Mail Server v1.0.8.0
  • Fixed a problem with web interface - was showing only first page of messages, and would not switch to other pages; In order to fix the web interface, mail server itself has to be updated;
  • When installint initially, was still using SQLite, even when SQL was requested;
  • There was a problem with switching from SQLite database engine to SQL server database engine: the SQL database was not being created;
5/23/2011 5:53:55 PM
ArGoSoft Mail Server .NET v1.0.7.9
  • The server no longer requires Microsoft SQL Server. If SQL server is not found, it will use SQLite engine, which does not require separate installation. If SQL server is found, then user will be prompted whether he wants to use it;
  • Made other improvements, such as, now mailbox rebuild indexes orphaned records, rather then deleting them, also added an opotion to increment UIDL validity of folder (both on the Mailbox viewer box);
  • Made minor improvements on web interface;
4/26/2011 9:47:25 PM


1 2 3 4 5 6

Get TZO


Home:ArGoStuff:Forums:Articles:Cyber Security Tips:FAQ:Downloads:Links
Copyright 2006-2011 by ArGoStuff Terms Of UsePrivacy Statement